コード例 #1
0
  public PortletPreferenceImpl(PortletPreferenceImpl portletPreference) {
    if (portletPreference.getName() == null) {
      throw new IllegalArgumentException("name cannot be null");
    }

    this.portletPreferenceId = -1;
    this.entityVersion = -1;
    this.name = portletPreference.getName();
    this.readOnly = portletPreference.isReadOnly();
    this.setValues(portletPreference.getValues());
  }
コード例 #2
0
 /** @see java.lang.Object#equals(Object) */
 @Override
 public boolean equals(Object object) {
   if (object == this) {
     return true;
   }
   if (!(object instanceof IPortletPreference)) {
     return false;
   }
   PortletPreferenceImpl rhs = (PortletPreferenceImpl) object;
   return new EqualsBuilder()
       .append(this.name, rhs.getName())
       .append(this.readOnly, rhs.isReadOnly())
       .append(this.getValues(), rhs.getValues())
       .isEquals();
 }