company logo

Property :: loadData - Load data by means of property source definitions

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

The source for loading data is defined by means of property source definitions (see also SDB_Member::source) for properties of the external data type. Source definitions are selected by an exchange schema name.

When the property handle or the source 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. Load data for default source definitions
    Property  :: loadData ( odaba::Property &rSourceProperty )

    The source for loading data is defined by means of property source definitions (see also SDB_Member::source) for properties of the current data type. The first source definition for each property is used as exchange rule.. Properties not having any source definition are not imported. 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.

    • rSourceProperty - Source property handle

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

  2. to list
  3. Load data for exchange schema
    Property  :: loadData ( odaba::Property &rSourceProperty, odaba::String &sExchangeName )

    The source for loading data is defined by means of property source definitions (see also SDB_Member::source) for properties of the current 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).

    • rSourceProperty - Source property handle

      The source 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