1 21 package oracle.toplink.essentials.descriptors.copying; 23 24 import oracle.toplink.essentials.exceptions.*; 25 import oracle.toplink.essentials.internal.helper.*; 26 import oracle.toplink.essentials.sessions.*; 27 28 31 public class InstantiationCopyPolicy extends AbstractCopyPolicy { 32 public InstantiationCopyPolicy() { 33 super(); 34 } 35 36 public Object buildClone(Object domainObject, Session session) throws DescriptorException { 37 return getDescriptor().getObjectBuilder().buildNewInstance(); 38 } 39 40 public boolean buildsNewInstance() { 41 return true; 42 } 43 44 public String toString() { 45 return Helper.getShortClassName(this) + "()"; 46 } 47 } 48 | Popular Tags |