public class PlasmaCopyHelper extends Object implements commonj.sdo.helper.CopyHelper
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.
| Modifier and Type | Field and Description |
|---|---|
static PlasmaCopyHelper |
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
commonj.sdo.DataObject |
copy(commonj.sdo.DataObject dataObject)
Create a deep copy of the DataObject tree.
|
commonj.sdo.DataObject |
copy(commonj.sdo.DataObject dataObject,
commonj.sdo.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.
|
commonj.sdo.DataObject |
copyAsReference(commonj.sdo.DataObject dataObject)
Create a deep copy of the given dataObject tree but where the UUID
and other instance properties are copied from the given data object copied
as well.
|
commonj.sdo.DataObject |
copyShallow(commonj.sdo.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.
|
commonj.sdo.DataObject |
copyShallowAsReference(commonj.sdo.DataObject dataObject)
Create a shallow copy of the given dataObject but where the UUID
and other instance properties are copied from the given data object copied
as well.
|
static PlasmaCopyHelper |
instance() |
public static volatile PlasmaCopyHelper INSTANCE
public static PlasmaCopyHelper instance()
public commonj.sdo.DataObject copyShallow(commonj.sdo.DataObject dataObject)
Note that in general 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 commonj.sdo.helper.CopyHelperdataObject - to be copiedpublic commonj.sdo.DataObject copyShallowAsReference(commonj.sdo.DataObject dataObject)
Note that data objects copied using this method should typically be used as "references" in UPDATE and DELETE operations, in order to avoid unnecessary queries.
dataObject - public commonj.sdo.DataObject copy(commonj.sdo.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 in general 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 an 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 commonj.sdo.helper.CopyHelperdataObject - to be copied.IllegalArgumentException - if any referenced DataObject is not part of the containment tree.public commonj.sdo.DataObject copyAsReference(commonj.sdo.DataObject dataObject)
Note that data graph and data objects copied using this method should typically be used in UPDATE and DELETE operations on the resulting data graph, in order to avoid unnecessary queries. To simply link/add an 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 - public commonj.sdo.DataObject copy(commonj.sdo.DataObject dataObject,
commonj.sdo.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 areIllegalArgumentException - if any referenced DataObject is not part of the containment tree.Copyright © 2021. All rights reserved.