company logo

Property :: changeFilter - Change filter condition

The property defines a condition (OSI expression), which allows checking whether a selected instance fulfills this condition or not. Instances not fulfilling the condition cannot be read by get() or tryGet(). Functions like next() or previous() select the next or previous instance fulfilling the condition.

In contrast to filter() the function returns the property handle.

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

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

Implementation details

odaba::Property & Property  :: changeFilter ( odaba::String &vExpression )

The function allows applying a new filter expression to the collection. Setting a filter will remove a filter or key filter previously set. In order to expand the filter condition, one may call expandFilter().

In order to reset the filter condition one may pass an empty expression string to the function.

When calling the function for property handles, which are not collections, or for invalid property handles, the function throws an exception.

  • vExpression - OSI inline expression

    An inline expression can be passed as operation path, as operand (something like a + b) or as complete expression. As operand, an expression may contain any expression, which is allowed in a statement, but no semicolon must be appended at the end.

    Complete expressions include expression header (optional) and may include different sections in the expression body which is enclosed in { ... }.

    In contrast to class expressions, inline expressions are not defined explicitly as class expressions but passed as strings to the application at run-time.

    In order to pass no expression, an empty string ( String() ) has to be passed.