Property :: copyData - Copy data from an instance area
The function copies the data from the instance passed into the selected instance of the property handle.
When one of the the property handle is not valid, when no instance is selected in the source property handle, or when terminating with errors, the function throws an exception.
A property handle refers to a (usually) opened property. Invalid properties may cause an exception.
Implementation overview
- Copy attributes from the instance passed
Property :: copyData ( cInstance, bKeyAttributes ) - Copy instance data from source instance
Property :: copyData ( cSourceProperty, eReplace ) - Copy instance data from source instance including key attributes
Property :: copyData ( cSourceProperty, eReplace, bKeyAttributes ) - Copy attributes from the instance passed
Property :: copyData ( cSourceProperty, bKeyAttributes )
Implementation details
-
Copy attributes from the instance passed
odaba::Property & Property  :: copyData ( odaba::Instance &cInstance, bool bKeyAttributes )
The structure of the instance area must correspond to the structure of the property handle. The instance of the calling property handle must be selected or selectable, which means that the function tries to auto-position an instance or for single reference to initialize a new instance.
When passing false in bKeyAttributes , attributes that are referenced in key component in any key defined for the data type remain unchanged.
- cInstance
- Instance
The instance is passed as String, which is structured as ESDF data (object interchange format).
- bKeyAttributes
- Process key attributes
The option is set to true in order to process attributes, that are referenced as key component in any of the keys defined for the data type.
to list
- cInstance
- Instance
-
Copy instance data from source instance
odaba::Property & Property  :: copyData ( odaba::Property &cSourceProperty, odaba::ReplaceOptions eReplace )
The implementation copies the data from the source instance into the target instance. All direct properties (attributes and base structures except key component attributes) are copied by name. References and relationships are copied, when not yet existing or when eReplace is set to ReplaceLocal (for references) or ReplaceAll (for references and relationships) has been defined.
All attributes that are referenced as of key component in any key defined for the data type remain unchanged.
The target instance will not be initialized by the function, i.e. fields not existing in the source instance are not be updated.
- cSourceProperty
- Source property handle
The source property handle is a reference to an opened Property. Invalid or not opened property handles may cause an exception.
- eReplace
- Replace option
Replace options can be passed in order to control the behavior of copy functions.
to list
- cSourceProperty
- Source property handle
-
Copy instance data from source instance including key attributes
odaba::Property & Property  :: copyData ( odaba::Property &cSourceProperty, odaba::ReplaceOptions eReplace, bool bKeyAttributes )
The implementation copies the data from the source instance into the target instance. All direct properties (attributes and base structures) are copied by name. References and relationships are copied, when not yet existing or when eReplace is set to ReplaceLocal (for references) or ReplaceAll (for references and relationships) has been defined.
When passing false in bKeyAttributes , attributes that are referenced in key component in any key defined for the data type remain unchanged.
The target instance will not be initialized by the function, i.e. fields not existing in the source instance are not be updated.
- cSourceProperty
- Source property handle
The source property handle is a reference to an opened Property. Invalid or not opened property handles may cause an exception.
- eReplace
- Replace option
Replace options can be passed in order to control the behavior of copy functions.
- bKeyAttributes
- Process key attributes
The option is set to true in order to process attributes, that are referenced as key component in any of the keys defined for the data type.
to list
- cSourceProperty
- Source property handle
-
Copy attributes from the instance passed
odaba::Property & Property  :: copyData ( odaba::Property &cSourceProperty, bool bKeyAttributes )
The structure of the instance area must correspond to the structure of the property handle. The instance of the calling property handle must be selected or selectable, which means that the function tries to auto-position an instance or for single reference to initialize a new instance.
When passing false in bKeyAttributes , attributes that are referenced in key component in any key defined for the data type remain unchanged.
- cSourceProperty
- Source property handle
The source property handle is a reference to an opened Property. Invalid or not opened property handles may cause an exception.
- bKeyAttributes
- Process key attributes
The option is set to true in order to process attributes, that are referenced as key component in any of the keys defined for the data type.
to list
- cSourceProperty
- Source property handle