else {
if (existingEntity == null) {
  public void _checkForDuplicateEntityName(EOEntity _entity, String _newName, Set _failures) throws DuplicateEntityNameException {    EOEntity existingEntity;    if (myModelGroup != null) {      existingEntity = myModelGroup.getEntityNamed(_newName);    }    else {      existingEntity = getEntityNamed(_newName);    }    if (existingEntity != null && existingEntity != _entity) {      if (_failures == null || _entity.getModel() != existingEntity.getModel()) {        throw new DuplicateEntityNameException(_newName, this);      }      String unusedName = findUnusedEntityName(_newName);      existingEntity.setName(unusedName, false);      _failures.add(new DuplicateEntityFailure(this, _newName, unusedName));    }  }