|
EclipseLink 2.3.2, build 'v20111125-r10461' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.persistence.sdo.helper.SDOCopyHelper
public class SDOCopyHelper
Purpose:
DataObject
s.
SDODataObject
Field Summary |
---|
Fields inherited from interface commonj.sdo.helper.CopyHelper |
---|
INSTANCE |
Constructor Summary | |
---|---|
SDOCopyHelper()
INTERNAL: This default constructor must be used in conjunction with the setHelperContext() function. |
|
SDOCopyHelper(HelperContext aContext)
Constructor that takes in a HelperContext instance that contains this copyHelper. |
Method Summary | |
---|---|
DataObject |
copy(DataObject dataObject)
Create a deep copy of the DataObject tree: Copies the dataObject and all its contained
DataObjects recursively. |
DataObject |
copy(DataObject dataObject,
SDOChangeSummary cs)
Create a deep copy of the DataObject tree: Copies the dataObject and all its contained
DataObjects recursively. |
DataObject |
copyShallow(DataObject dataObject)
Create a shallow copy of the DataObject dataObject: Creates a new DataObject copiedDataObject with the same values as the source dataObject for each property where property.getType().isDataType() is true. |
HelperContext |
getHelperContext()
INTERNAL: Return the helperContext containing this copyHelper. |
void |
setHelperContext(HelperContext helperContext)
INTERNAL: Set the helperContext if this copyHelper was created using the default constructor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SDOCopyHelper()
public SDOCopyHelper(HelperContext aContext)
aContext
- Method Detail |
---|
public DataObject copyShallow(DataObject dataObject)
copyShallow
in interface CopyHelper
dataObject
- to be copied
public DataObject copy(DataObject dataObject) throws java.lang.IllegalArgumentException
contained
DataObjects recursively.
Values of Properties are copied as in shallow copy,
and values of Properties where
property.getType().isDataType() is false
are copied where each value copied must be a
DataObject contained by the source dataObject.
If a DataObject is outside the DataObject tree and the
property is bidirectional, then the DataObject is skipped.
If a DataObject is outside the DataObject tree and the
property is unidirectional, then the same DataObject is referenced.
Read-only properties are copied.
If any DataObject referenced is not in the containment
tree an IllegalArgumentException is thrown.
If a ChangeSummary is part of the copy tree the new
ChangeSummary refers to objects in the new DataObject tree.
Logging state is the same as the source ChangeSummary.
copy
in interface CopyHelper
dataObject
- to be copied.
java.lang.IllegalArgumentException
- if any referenced DataObject
is not part of the containment tree.public DataObject copy(DataObject dataObject, SDOChangeSummary cs) throws java.lang.IllegalArgumentException
contained
DataObjects recursively.
For each Property where property.type.dataType is true, the values of Properties are copied as in shallow copy, and values of Properties where property.getType().isDataType() is false are copied where each value copied must be a DataObject contained by the source dataObject.
If a DataObject is outside the DataObject tree and the property is bidirectional, then the DataObject is not copied and references to the object are also not copied.
If a DataObject is outside the DataObject tree and the property is unidirectional, then the same DataObject is referenced.
Read-only properties are copied.
If any DataObject referenced is not in the containment tree an IllegalArgumentException is thrown.
If a ChangeSummary is part of the copy tree the new ChangeSummary refers to objects in the new DataObject tree. Logging state is the same as the source ChangeSummary.
dataObject
- to be copied.
java.lang.IllegalArgumentException
- if any referenced DataObject
is not part of the containment tree.public HelperContext getHelperContext()
public void setHelperContext(HelperContext helperContext)
helperContext
-
|
EclipseLink 2.3.2, build 'v20111125-r10461' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |