public void addRelationship(EORelationship _relationship, boolean _fireEvents, Set _failures) throws DuplicateNameException { _relationship._setEntity(this); _checkForDuplicateRelationshipName(_relationship, _relationship.getName(), _failures); _relationship.pasted(); Set oldRelationships = null; if (_fireEvents) { oldRelationships = myRelationships; Set newRelationships = new TreeSet(PropertyListComparator.AscendingPropertyListComparator); newRelationships.addAll(myRelationships); newRelationships.add(_relationship); myRelationships = newRelationships; firePropertyChange(EOEntity.RELATIONSHIPS, oldRelationships, myRelationships); } else { myRelationships.add(_relationship); }
public void addRelationship(EORelationship _relationship) throws DuplicateNameException { addRelationship(_relationship, true, null);
  public void addRelationship(EORelationship _relationship, boolean _fireEvents, Set _failures) throws DuplicateNameException {    _relationship._setEntity(this);    _checkForDuplicateRelationshipName(_relationship, _relationship.getName(), _failures);    _relationship.pasted();    Set oldRelationships = null;    if (_fireEvents) {      oldRelationships = myRelationships;      Set newRelationships = new TreeSet(PropertyListComparator.AscendingPropertyListComparator);      newRelationships.addAll(myRelationships);      newRelationships.add(_relationship);      myRelationships = newRelationships;      firePropertyChange(EOEntity.RELATIONSHIPS, oldRelationships, myRelationships);    }    else {      myRelationships.add(_relationship);    }  }