Module org.eclipse.persistence.core
Annotation Type CloneCopyPolicy
A CloneCopyPolicy is used to set an
org.eclipse.persistence.descriptors.copying.CloneCopyPolicy on an Entity.
A CloneCopyPolicy must specify at one or both of the "method" or
"workingCopyMethod".
"workingCopyMethod" is used to clone objects that will be returned to the
user as they are registered in EclipseLink's transactional mechanism, the
UnitOfWork.
"method" will be used for the clone that is used for comparison in
conjunction with EclipseLink's DeferredChangeDetectionPolicy
A CloneCopyPolicy should be specified on an Entity, MappedSuperclass or
Embeddable.
Example:
@Entity
@CloneCopyPolicy(method="myCloneMethod")
or:
@Entity
@CloneCopyPolicy(method="myCloneMethod", workingCopyMethod="myWorkingCopyCloneMethod")
or:
@Entity
@CloneCopyPolicy(workingCopyMethodName="myWorkingCopyClone")
- See Also:
-
Required Element Summary
Modifier and TypeRequired ElementDescription(Optional) Either method or workingCopyMethod must be specified this defines a method that will be used to create a clone that will be used for comparison by EclipseLink's DeferredChangeDetectionPolicy(Optional) Either method or workingCopyMethod must be specified this defines a method that will be used to create a clone that will be used to create the object returned when registering an Object in an EclipseLink UnitOfWork
-
Element Details
-
method
String method(Optional) Either method or workingCopyMethod must be specified this defines a method that will be used to create a clone that will be used for comparison by EclipseLink's DeferredChangeDetectionPolicy -
workingCopyMethod
String workingCopyMethod(Optional) Either method or workingCopyMethod must be specified this defines a method that will be used to create a clone that will be used to create the object returned when registering an Object in an EclipseLink UnitOfWork
-