Property :: copyExtensions - Copy property extensions
The function copies extension properties from the instance selected in cSourceProperty to the instance selected in the current property handle. Instances in both property handles have to be selected.
The function copies all extensions from the source property handle to the current property handle. Extension properties that do already exist in the target instance are replaced according to the replace option passed.
The function returns the number of property extensions copied from the source instance. When the source does not carry extensions, or when it is not expandable, the function returns 0. The function throws an excretion, when no instance is selected in one of the property handles or when at least one of the property handles is not valid.
The value contains the number of items to be processed or stored in a collection.
Implementation overview
- Copy property extensions
Property :: copyExtensions ( cSourceProperty, eReplace, eCopyType ) - Copy all property extensions accordint to replace option
Property :: copyExtensions ( cSourceProperty, eReplace ) - Copy all without replacing existing
Property :: copyExtensions ( cSourceProperty )
Implementation details
-
Copy property extensions
int32 Property  :: copyExtensions ( odaba::Property &cSourceProperty, odaba::ReplaceOptions eReplace, odaba::CopyTypes eCopyType )
The function copies all extensions according to the value passed in eCopyType:
- CopyInstances - attributes are copied, only
- CopyRelationships - relationships are copied, only
- CopyLocal - attributes and references are copied
- CopyAll, CopyDeep - all extension are copied
Existing attributes are not replaced, when ReplaceNone has been passed. References and relationships are updated according to the replace option passed in eReplace.
- 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.
- eCopyType
- Copy type
The copy type defines the amount of data to be copied or exported.
to list
-
Copy all property extensions accordint to replace option
int32 Property  :: copyExtensions ( odaba::Property &cSourceProperty, odaba::ReplaceOptions eReplace )
The function copies all property extensions (attributes, references and relationships). Existing attributes are not replaced, when ReplaceNone has been passed. References and relationships are updated according to the replace option passed in eReplace.
- 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 all without replacing existing
int32 Property  :: copyExtensions ( odaba::Property &cSourceProperty )
The function copies all property extensions /attributes, references and relationships) but existing attributes are not replaced. Instances from collection properties are copied to target extension collections, when not yet existing.
- 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.
to list
- cSourceProperty
- Source property handle