company logo

Property - Property Handle

Property handles are used to handle persistent or transient data sources . A data source is a collection, object instance or an elementary data item. A data source contains the data for a property of a specific object.

A property handle usually handles a collection of subsequent object instance. In special cases the collection is singular (e.g. direction for a Person is exactly one Address object instance). In other cases the instance is elementary (as e.g. the given_names of a Person ).

A property handle has a cursor function that allows to select one of the instances in the collection as the "current" instance. Only from the selected instance you can retrieve data by means of subsequent property handles and the value() property for elementary data sources.

Notes:

When running import/export in a client/server environment, the file name passed in sFilePath has to be a symbolic file name which is defined in the file catalog on client and server side. The export/import is executed on server. The result is transferred finally to the client location defined in the client's file catalog.

Typed and generic property handles

One could define typed property handles using a property handle template class PH< type > . This requires that a C++ class header file has been created for the referenced type. In this case, attributes and relationships could be accessed directly by referring to corresponding member names. In this case, however, the system looses control over modifications, which causes missing events and in some cases database inconsistency. Moreover, object model changes requires recompiling the complete application, in many cases.

Hence, generic access is more appropriate, even though one may loose 2 or 3% performance. Generic access uses value handles for accessing attributes and property handle hierarchies in order to access subordinated collections.

Value handles

In order to access attributes, value handles are provided. Value handles support arithmetical operations and allow updating attribute values. Values in an instance can be accessed by value( name ) .

Property handle hierarchies

Property handles form a tree that defines a specific view in an application. When defining this view once the property handles can be used as long as the application follows the defined "view". When defining a property handle for AllPersons , which is an extent in the database, you may define subordinated property handles for children and company , which refer to the persons children and the company the person is working for. When selecting another person in the AllPersons property handle, the collections for children and company will change automatically, i.e. when changing the selection in a parent property handle the collections for all subordinated property handles are adjusted automatically.

In order to access a subordinated property handle, an instance has to selected in the parent property handle. When changing the selection in the parent property handle, all subordinated property handles will loose their current selection.

Property handle filter

Usually a property handle shows all the elements that have been added to the data source. You can restrict the number of visible instances by setting a filter ( filter( expression ) ) using an expression or a C++ context function function, which overloads the doAfterRead() handler.

Operations with property handles

Property handles support set operations or more complex operation paths. Set operations are provided as property handle functions. Extended features are provided with operation paths, which can be opened as property handle data source.

transient properties - Title unknown
Attributes
    Function Groups
    Functions