Class Predicate
java.lang.Object
com.aquima.interactions.expressions.semantics.SemanticNodeBase
com.aquima.interactions.expressions.semantics.nodes.Predicate
- All Implemented Interfaces:
ISemanticNode
Predicate expression node (each, exists, isactive) that evaluates to a boolean.
- Since:
- 6.4
- Author:
- O. Kerpershoek, F. van der Meer
-
Constructor Summary
ConstructorsConstructorDescriptionPredicate
(Position position, PredicateType type, ISemanticNode fromNode, Identifier alias, ISemanticNode whereNode) Constructs the node with the required arguments. -
Method Summary
Modifier and TypeMethodDescriptionvoid
collectScopedObjects
(ScopedObjects resultSet) This method may be used to collect the names of the objects that need to be in scope in order to evaluate the expression of this node.getAlias()
This method returns the name that should be used for each active object from the "fromExpr" expression.This method returns an array containing the child nodes.This method returns the expression that should be used to collect the list of objects that should be iterated over.This method returns a condition expression that should be evaluated for each active object to check if it should be processed.boolean
This method returns a boolean indicating if this node represents an EACH predicate.boolean
This method returns a boolean indicating if this node represents an EXISTS predicate.boolean
Indicates that this node is an ISACTIVE predicatetoString()
void
visit
(ISemanticNodeVisitor visitor) This method allows a type safe visitation of the node.Methods inherited from class com.aquima.interactions.expressions.semantics.SemanticNodeBase
addMessage, getDataType, getDomain, getMessages, getPosition, getType, hasMessage, isDerivedType, isMultivalue, setDerived, setDomain, setType, setType
-
Constructor Details
-
Predicate
public Predicate(Position position, PredicateType type, ISemanticNode fromNode, Identifier alias, ISemanticNode whereNode) Constructs the node with the required arguments.- Parameters:
position
- Position information for the node.type
- The type of the predicate node.fromNode
- The expression that should be used to collect the list of objects that should be iterated over.alias
- The name that should be used for each active object from the "fromExpr" expression.whereNode
- Condition expression that should be evaluated for each active object to check if it should be processed.
-
-
Method Details
-
getChildNodes
Description copied from interface:ISemanticNode
This method returns an array containing the child nodes. The order of the child nodes in the array is not defined, and the array may be empty for nodes that do not have child nodes.- Returns:
- Array containing the child nodes of this node.
-
collectScopedObjects
Description copied from interface:ISemanticNode
This method may be used to collect the names of the objects that need to be in scope in order to evaluate the expression of this node. The object passed to the method will be enriched with the names of the objects that need to be in scope.- Parameters:
resultSet
- The object that should be used to add the names of the objects that need to be in scope to.
-
getFromNode
This method returns the expression that should be used to collect the list of objects that should be iterated over.- Returns:
- The expression that should be used to collect the list of objects that should be iterated over.
-
getWhereNode
This method returns a condition expression that should be evaluated for each active object to check if it should be processed.- Returns:
- Condition expression that should be evaluated for each active object to check if it should be processed.
-
getAlias
This method returns the name that should be used for each active object from the "fromExpr" expression.- Returns:
- The name that should be used for each active object from the "fromExpr" expression.
-
isEachPredicate
public boolean isEachPredicate()This method returns a boolean indicating if this node represents an EACH predicate.- Returns:
- a boolean indicating if this node represents an EACH predicate.
-
isExistsPredicate
public boolean isExistsPredicate()This method returns a boolean indicating if this node represents an EXISTS predicate.- Returns:
- a boolean indicating if this node represents an EXISTS predicate.
-
isIsActivePredicate
public boolean isIsActivePredicate()Indicates that this node is an ISACTIVE predicate- Returns:
- true if predicate is ISACTIVE
-
visit
Description copied from interface:ISemanticNode
This method allows a type safe visitation of the node. The visit method will not invoke the visitor for any child nodes.- Parameters:
visitor
- The visitor that should be invoked for this node.
-
toString
- Overrides:
toString
in classSemanticNodeBase
-