public boolean equals(Object o) { if (o instanceof OrgRelation) { OrgRelation or = (OrgRelation) o; return matches(getAssignedRole(), or.getAssignedRole()) && matches(getRelationType(), or.getRelationType()) && matches(getUID(), or.getUID()) && matches(getOrgID(), or.getOrgID()) && matches(getOtherOrgId(), or.getOtherOrgId()) && matches(getForcePackageId(), or.getForcePackageId()) && matches(getOplanUID(), or.getOplanUID()) && matches(getTimeSpan(), or.getTimeSpan()); } else return false; }
public void setAll(Transferable other) { if (!(other instanceof OrgRelation)) { throw new IllegalArgumentException("Parameter is not an OrgRelation."); } else { OrgRelation or = (OrgRelation) other; relationType = or.getRelationType(); orgID = or.getOrgID(); forcePackageID = or.getForcePackageId(); oplanUID = or.getOplanUID(); timeSpan = or.getTimeSpan(); otherOrgID = or.getOtherOrgId(); role = or.getAssignedRole(); setUID(or.getUID()); setOwner(or.getOwner()); } // else set everything } // setAll