} else { boolean unusedNameFound = (myModelGroup.getEntityNamed(_newName) == null); for (int dupeNameNum = 1; !unusedNameFound; dupeNameNum++) { unusedName = _newName + dupeNameNum; EOEntity renameEntity = myModelGroup.getEntityNamed(unusedName); unusedNameFound = (renameEntity == null); }
unusedNameFound = (renameEntity == null);
  public String findUnusedEntityName(String _newName) {    String unusedName = _newName;    if (myModelGroup == null) {      boolean unusedNameFound = (getEntityNamed(_newName) == null);      for (int dupeNameNum = 1; !unusedNameFound; dupeNameNum++) {        unusedName = _newName + dupeNameNum;        EOEntity renameEntity = getEntityNamed(unusedName);        unusedNameFound = (renameEntity == null);      }    }    else {      boolean unusedNameFound = (myModelGroup.getEntityNamed(_newName) == null);      for (int dupeNameNum = 1; !unusedNameFound; dupeNameNum++) {        unusedName = _newName + dupeNameNum;        EOEntity renameEntity = myModelGroup.getEntityNamed(unusedName);        unusedNameFound = (renameEntity == null);      }    }    return unusedName;  }