company logo

Property :: storeData - Store data by means of property source definitions

The function allows storing data from the current property handle to the target property (sTargetProperty) by means of property source definitions. Although the function is mainly used for for storing data from external property handle (current property handle) to database instances,it may be used also for copying data between external or internal property handles. The function adds data to the target collection/instance and replaces instances with same identifying key values. Instances in unordered collections remain unchanged.

The target for storing data is defined by means of property source definitions (see also SDB_Member::source) for properties of the current data type. Source definitions may be selected by an exchange schema name.

When the property handle or the target property handle is not valid or when an error has been detected while loading data, the function throws an exception.

Implementation overview

Implementation details

  1. Store data for default source definitions
    Property  :: storeData ( odaba::Property &rTargetProperty )

    The target for storing data is defined by means of property source definitions (see also SDB_Member::source) for properties of the external data type. The first source definition for each property is used as exchange rule. Properties not having any source definition are not stored. When a source definition has been defined for a complex data type or collection, properties for referenced data types are assigned according to the same rules, i.e. by looking for the first source definition.

    • rTargetProperty - Target property handle

      The target property handle is a reference to an opened Property. Invalid or not opened property handles may cause an exception.

  2. to list
  3. Store data for exchange schema
    Property  :: storeData ( odaba::Property &rTargetProperty, odaba::String &sExchangeName )

    The target for storing data is defined by means of property source definitions (see also SDB_Member::source) for properties of the current (external file) data type. Source definitions are either selected by exchange schema name passed in sExchangeName, which must be the source definition name for all properties to be imported or by using the first source definition (when sExchangeName is empty). Properties not having a matching source definition are not imported. When a source definition has been found for a complex data type or collection, properties for referenced data types are assigned according to the same rules, i.e. by looking for a source definition with the exchange schema name sExchangeName or using the first source definition (for empty schema name).

    • rTargetProperty - Target property handle

      The target property handle is a reference to an opened Property. Invalid or not opened property handles may cause an exception.

    • sExchangeName - Exchange name

      The exchange name is a data source name to be used for data exchange.

  4. to list