company logo

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.

Return value:  Number of items ( int32  )

The value contains the number of items to be processed or stored in a collection.

Implementation overview

Implementation details

  1. 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.

  2. to list
  3. 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.

  4. to list
  5. 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.

  6. to list