company logo

Property :: setAutoSelection - Set auto selection

The function sets a single selection condition for the property handle by key or position. The function can be used instead of passing a selection argument to the property handle like children(0) or children("Paul"). Since passing selection arguments to property handles in a property path after a function call is not possible, autoSelect() may be called.

The function does not select the instance, but supports internal selections when required.

When the property handle is not valid, the function throws an exception.

  children.changeAccessKey("first_name").setAutoSelection("Paul",false);

Return value:  Property reference ( odaba::Property & )

A property handle refers to a (usually) opened property. Invalid properties may cause an exception.

Implementation overview

Implementation details

  1. Set auto selection by Key
    odaba::Property Property  :: setAutoSelection ( odaba::Key &cKey, bool bProvide )

    The function sets the auto selection option to the instance with the key value passed in cKey.

    When required internally or when calling autoSelect(), the instance will be automatically selected. When no instance with key value cKey exists, a new instance will be created, when bProvide is true. Otherwise, no instance will be selected (and autoSelect() will return an unselected property handle).

    • cKey - Key value

      A key value is the key definition and a value for the key. The key value is typically provided in ESDF format. Other formats might be set (OIF, XML)

    • bProvide - Option to request instanziation

      If necessary the requested object instance is created.

  2. to list
  3. Set auto selection by position
    odaba::Property Property  :: setAutoSelection ( int32 iPosition, bool bProvide )

    The function sets the auto selection option to the position passed in iPosition.

    When required internally or when calling autoSelect(), the instance will be automatically selected. When iPosition is greater or equal the the collection count, a new instance will be created, when bProvide is true. Otherwise, no instance will be selected (and autoSelect() will return an unselected property handle).


    • iPosition - Position in collection

      The position of an element in a collection is beginning with 0 for the first element.

    • bProvide - Option to request instanziation

      If necessary the requested object instance is created.

  4. to list