Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle TopLink
11g Release 1 (11.1.1)

B32476-02


oracle.toplink.descriptors.copying
Class CloneCopyPolicy

java.lang.Object
  extended by oracle.toplink.descriptors.copying.AbstractCopyPolicy
      extended by oracle.toplink.descriptors.copying.CloneCopyPolicy

All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, CopyPolicy

public class CloneCopyPolicy
extends AbstractCopyPolicy

Purpose: Creates a clone through a clone method.

See Also:
Serialized Form

Constructor Summary
CloneCopyPolicy()
           

 

Method Summary
 java.lang.Object buildClone(java.lang.Object domainObject, Session session)
          Clone through calling the clone method.
 boolean buildsNewInstance()
          Return false as a shallow clone is returned, not a new instance.
 java.lang.Object buildWorkingCopyClone(java.lang.Object domainObject, Session session)
          Clone through the workingCopyClone method, or if not specified the clone method.
 java.lang.Object buildWorkingCopyCloneFromRow(Record row, ObjectBuildingQuery query, java.util.Vector primaryKey, UnitOfWork uow)
          Create a new instance, unless a workingCopyClone method is specified, then build a new instance and clone it.
 java.lang.String getMethodName()
          Return the clone method name.
 java.lang.String getWorkingCopyMethodName()
          Return the workingCopyClone method name.
 void initialize(Session session)
          Validate and build the methods.
 void setMethodName(java.lang.String methodName)
          Set the clone method name.
 void setWorkingCopyMethodName(java.lang.String methodName)
          Set the workingCopyClone method name.
 java.lang.String toString()
           

 

Methods inherited from class oracle.toplink.descriptors.copying.AbstractCopyPolicy
buildWorkingCopyCloneFromPrimaryKeyObject, buildWorkingCopyCloneFromRow, setDescriptor

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Constructor Detail

CloneCopyPolicy

public CloneCopyPolicy()

Method Detail

buildClone

public java.lang.Object buildClone(java.lang.Object domainObject,
                                   Session session)
                            throws DescriptorException
Clone through calling the clone method.
Specified by:
buildClone in interface CopyPolicy
Specified by:
buildClone in class AbstractCopyPolicy
Throws:
DescriptorException

buildWorkingCopyClone

public java.lang.Object buildWorkingCopyClone(java.lang.Object domainObject,
                                              Session session)
                                       throws DescriptorException
Clone through the workingCopyClone method, or if not specified the clone method.
Specified by:
buildWorkingCopyClone in interface CopyPolicy
Overrides:
buildWorkingCopyClone in class AbstractCopyPolicy
Throws:
DescriptorException

buildWorkingCopyCloneFromRow

public java.lang.Object buildWorkingCopyCloneFromRow(Record row,
                                                     ObjectBuildingQuery query,
                                                     java.util.Vector primaryKey,
                                                     UnitOfWork uow)
                                              throws DescriptorException
Create a new instance, unless a workingCopyClone method is specified, then build a new instance and clone it.
Specified by:
buildWorkingCopyCloneFromRow in interface CopyPolicy
Overrides:
buildWorkingCopyCloneFromRow in class AbstractCopyPolicy
Throws:
DescriptorException

getMethodName

public java.lang.String getMethodName()
Return the clone method name.

getWorkingCopyMethodName

public java.lang.String getWorkingCopyMethodName()
Return the workingCopyClone method name. This is used to clone within a unit of work.

initialize

public void initialize(Session session)
                throws DescriptorException
Validate and build the methods.
Specified by:
initialize in interface CopyPolicy
Overrides:
initialize in class AbstractCopyPolicy
Throws:
DescriptorException

setMethodName

public void setMethodName(java.lang.String methodName)
Set the clone method name.

setWorkingCopyMethodName

public void setWorkingCopyMethodName(java.lang.String methodName)
Set the workingCopyClone method name. This is used to clone within a unit of work.

buildsNewInstance

public boolean buildsNewInstance()
Return false as a shallow clone is returned, not a new instance.
Specified by:
buildsNewInstance in interface CopyPolicy
Specified by:
buildsNewInstance in class AbstractCopyPolicy

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Skip navigation links

Copyright © 1998, 2009, Oracle. All Rights Reserved.