/** * Utility returning a copy of the "base" of this instance * This utility does not copy the associations with other instances * * @return a clone of this instance */ public IdentifiedObject clone() { IdentifiedObject newInstance = new IdentifiedObject(this); IdentifiedObject newInstanceSP = newInstance; return newInstanceSP; }
/** * Factory of the class * * @param id * id of the class IdentifiedObject to create * @return the class created */ public static IdentifiedObject create(final String id) { IdentifiedObject newIdentifiedObject = new IdentifiedObject(); newIdentifiedObject.setId(id); return newIdentifiedObject; }