Represents a composite filtering rule which can be applied by the client to fetch only records matching the given restrictions.
CompositeCondition consist of a single RelationOperator and an array of sub-Conditions which belongs logically under this composition. Assigned RelationOperator is always aplied between all passed sub-Conditions.
Sub-Condition might be again instance of CompositeCondition which results in a deeper tree based structure or if they are rather leafs, they need to be instances of SimpleCondition. That allows Application Builder UI (and also API client when using Conditions factory) to potentially build any tree structure including parenthesis logic.
- Version:
- 17.1.1
- Source:
- See:
-
- SimpleCondition
- RelationOperator
- Conditions.OR(..) to create CompositeConditions with RelationOperator.OR set.
- Conditions.AND(..) to create CompositeConditions with RelationOperator.AND set.
- ConditionVisitor.visitCompositeCondition(..) to check how ConditionVisitor is processed.
Methods
getRelationOperator() → {bop/js/api/operation/RelationOperator}
stable API
Gets the RelationOperator assigned to this CompositeCondition.
- Version:
- 17.1.1
- Source:
Returns:
getSubConditions() → {Array.<operation/js/api/Condition>}
stable API
Gets an array of sub-Conditions belonging under this CompositeCondition.
Sub-Condition might be either instance of CompositeCondition which means we are dealing with a deeper tree based structure or leafs will be instances of SimpleCondition.
- Version:
- 17.1.1
- Source:
Returns:
- Type
- Array.<operation/js/api/Condition>