Esempio n. 1
0
 public boolean same(Transferable other) {
   if (other instanceof OrgRelation) {
     OrgRelation or = (OrgRelation) other;
     return (getUID().equals(or.getUID()));
   }
   return false;
 }
Esempio n. 2
0
  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
Esempio n. 3
0
  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;
  }
Esempio n. 4
0
  public Object clone() {
    OrgRelation or = new OrgRelation(orgID, oplanUID);
    or.setForcePackageId(forcePackageID);
    or.setRelationType(relationType);
    or.setAssignedRole(role);
    or.setOtherOrgId(otherOrgID);
    or.setUID(getUID());
    or.setOwner(getOwner());

    if (timeSpan != null) or.setTimeSpan((TimeSpan) timeSpan.clone());
    return or;
  } // clone