A CloneCopyPolicy is used to set an CloneCopyPolicy
on an Entity. A CloneCopyPolicy must specify at least one or both of the method() or workingCopyMethod().
or:
- 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() is used for the clone that is used for comparison in conjunction with EclipseLink's DeferredChangeDetectionPolicy.
A CloneCopyPolicy can be specified on an Entity, MappedSuperclass or Embeddable.
Example:
@Entity
@CloneCopyPolicy(method="myCloneMethod")
@Entity
@CloneCopyPolicy(method="myCloneMethod", workingCopyMethod="myWorkingCopyCloneMethod")
@Entity
@CloneCopyPolicy(workingCopyMethodName="myWorkingCopyClone")
- See Also:
- Author:
- tware
-
Required Element Summary
Required ElementsModifier and TypeRequired ElementDescriptionDefines a method that will be used to create a clone that will be used for comparison by EclipseLink's DeferredChangeDetectionPolicy.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 methodDefines a method that will be used to create a clone that will be used for comparison by EclipseLink's DeferredChangeDetectionPolicy.Either method or workingCopyMethod() must be specified
-
workingCopyMethod
String workingCopyMethodDefines 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.Either method() or workingCopyMethod must be specified
-