|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.plasma.sdo.helper.PlasmaCopyHelper
public class PlasmaCopyHelper
Copy utilities class.
Note that copied data objects
have the same data properties as the source but have new
(and therefore different) underlying UUID
and other management properties which are not defined within the
source Type. Use copied data objects to help automate and save
save effort when creating NEW data objects. To simply link/add
and existing data object to a new data graph, first use DataObject.detach() to
remove it from its graph. Than add it to a another graph.
| Field Summary | |
|---|---|
static PlasmaCopyHelper |
INSTANCE
|
| Method Summary | |
|---|---|
DataObject |
copy(DataObject dataObject)
Create a deep copy of the DataObject tree. |
DataObject |
copy(DataObject dataObject,
Type[] referenceTypes)
Create a deep copy of the DataObject tree while exempting all DataObject nodes with an SDO type found in the given reference Types array. |
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. |
static PlasmaCopyHelper |
instance()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static PlasmaCopyHelper INSTANCE
| Method Detail |
|---|
public static PlasmaCopyHelper instance()
public DataObject copyShallow(DataObject dataObject)
Note that copied data objects
have the same data properties as the source but have new
(and therefore different) underlying UUID
and other management properties which are not defined within the
source Type. Use copied data objects to help automate and save
save effort when creating NEW data objects. To simply link/add
and existing data object to a new data graph, first use DataObject.detach() to
remove it from its graph. Than add it to a another graph.
copyShallow in interface CopyHelperdataObject - to be copied
public DataObject copy(DataObject dataObject)
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.
The Logging state in the source ChangeSummary is not replicated in the
target ChangeSummary. All copied data objects are in a 'created' state
ready to be used for insert operations.
Note that copied data objects
have the same data properties as the source but have new
(and therefore different) underlying UUID
and other management properties which are not defined within the
source Type. Use copied data objects to help automate and save
save effort when creating NEW data objects. To simply link/add
and existing data object to a new data graph, first use DataObject.detach() to
remove it from its graph. Than add it to a another graph.
copy in interface CopyHelperdataObject - to be copied.
IllegalArgumentException - if any referenced DataObject
is not part of the containment tree.
public DataObject copy(DataObject dataObject,
Type[] referenceTypes)
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.
The Logging state in the source ChangeSummary is not replicated in the
target ChangeSummary. All copied data objects are in a 'created' state
ready to be used for insert operations.
Note that copied data objects
have the same data properties as the source but have new
(and therefore different) underlying UUID
and other management properties which are not defined within the
source Type. Use copied data objects to help automate and save
save effort when creating NEW data objects. To simply link/add
and existing data object to a new data graph, first use DataObject.detach() to
remove it from its graph. Than add it to a another graph.
dataObject - to be copied.referenceTypes - an array of types which are
IllegalArgumentException - if any referenced DataObject
is not part of the containment tree.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||