Module eclipselink

Annotation Interface CloneCopyPolicy


@Target(TYPE) @Retention(RUNTIME) public @interface CloneCopyPolicy
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().

A CloneCopyPolicy can be specified on an Entity, MappedSuperclass or Embeddable.

Example:

 @Entity
 @CloneCopyPolicy(method="myCloneMethod")
or:
 @Entity
 @CloneCopyPolicy(method="myCloneMethod", workingCopyMethod="myWorkingCopyCloneMethod")
 @Entity
 @CloneCopyPolicy(workingCopyMethodName="myWorkingCopyClone")
See Also:
Author:
tware
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Defines 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 method
      Defines 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 workingCopyMethod
      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.

      Either method() or workingCopyMethod must be specified