Top Description Fields Constructors Methods
org.eclipse.persistence.descriptors.copying

public abstract Class AbstractCopyPolicy

extends Object
implements CopyPolicy
Class Inheritance
All Implemented Interfaces
org.eclipse.persistence.descriptors.copying.CopyPolicy, java.io.Serializable, java.lang.Cloneable
Known Direct Subclasses
org.eclipse.persistence.descriptors.copying.CloneCopyPolicy, org.eclipse.persistence.descriptors.copying.InstantiationCopyPolicy, org.eclipse.persistence.descriptors.copying.PersistenceEntityCopyPolicy
Imports
org.eclipse.persistence.descriptors.ClassDescriptor, org.eclipse.persistence.exceptions.DescriptorException, org.eclipse.persistence.queries.ObjectBuildingQuery, org.eclipse.persistence.sessions.DataRecord, .Session, .UnitOfWork

Purpose: Allows customization of how an object is cloned. This class defines common behavior that allows a subclass to be used and set on a descriptor to provide a special cloning routine for how an object is cloned in a unit of work.

Field Summary

Modifier and TypeField and Description
protected ClassDescriptor

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public abstract Object
buildClone(Object domainObject, Session session)

Redeclares org.eclipse.persistence.descriptors.copying.CopyPolicy.buildClone.

Return a shallow clone of the object for usage with object copying, or unit of work backup cloning.
public Object
public Object
public Object
clone()

Overrides java.lang.Object.clone.

Implements org.eclipse.persistence.descriptors.copying.CopyPolicy.clone.

INTERNAL: Clones the CopyPolicy
protected ClassDescriptor
getDescriptor()

Return the descriptor.

public void
public void
Inherited from java.lang.Object:
equalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

descriptorback to summary
protected ClassDescriptor descriptor

Constructor Detail

AbstractCopyPolicyback to summary
protected AbstractCopyPolicy()

Method Detail

buildCloneback to summary
public abstract Object buildClone(Object domainObject, Session session) throws DescriptorException

Redeclares org.eclipse.persistence.descriptors.copying.CopyPolicy.buildClone.

Doc from org.eclipse.persistence.descriptors.copying.CopyPolicy.buildClone.

Return a shallow clone of the object for usage with object copying, or unit of work backup cloning.

Annotations
@Override
buildWorkingCopyCloneback to summary
public Object buildWorkingCopyClone(Object domainObject, Session session) throws DescriptorException

Implements org.eclipse.persistence.descriptors.copying.CopyPolicy.buildWorkingCopyClone.

By default use the buildClone.

Annotations
@Override
buildWorkingCopyCloneFromRowback to summary
public Object buildWorkingCopyCloneFromRow(DataRecord row, ObjectBuildingQuery query, Object primaryKey, UnitOfWork uow) throws DescriptorException

Implements org.eclipse.persistence.descriptors.copying.CopyPolicy.buildWorkingCopyCloneFromRow.

By default create a new instance.

Annotations
@Override
cloneback to summary
public Object clone()

Overrides java.lang.Object.clone.

Implements org.eclipse.persistence.descriptors.copying.CopyPolicy.clone.

INTERNAL: Clones the CopyPolicy

Returns:Object

Doc from java.lang.Object.clone.

a clone of this instance.

Annotations
@Override
getDescriptorback to summary
protected ClassDescriptor getDescriptor()

Return the descriptor.

initializeback to summary
public void initialize(Session session) throws DescriptorException

Implements org.eclipse.persistence.descriptors.copying.CopyPolicy.initialize.

Do nothing by default.

Annotations
@Override
setDescriptorback to summary
public void setDescriptor(ClassDescriptor descriptor)

Implements org.eclipse.persistence.descriptors.copying.CopyPolicy.setDescriptor.

Set the descriptor.

Annotations
@Override