java.lang.Object
com.aquima.interactions.expressions.semantics.SemanticNodeBase
com.aquima.interactions.expressions.semantics.nodes.Select
All Implemented Interfaces:
ISemanticNode

public class Select extends SemanticNodeBase
The select expression can be used to retrieve one or more values that match the specified condition.
Since:
6.4
Author:
O. Kerpershoek, F. van der Meer
  • Constructor Details

    • Select

      public Select(Position position, ISemanticNode whatExpr, Identifier alias, ISemanticNode fromExpr, ISemanticNode whereExpr)
      Constructs the node with the required arguments.
      Parameters:
      position - Position information for the node.
      whatExpr - The expression that should be used to select a value from the active object.
      alias - The name that should be used for each active object from the "fromExpr" expression.
      fromExpr - The expression that should be used to collect the list of objects that should be iterated over.
      whereExpr - Condition expression that should be evaluated for each active object to check if it should be processed.
  • Method Details

    • getWhatExpression

      public ISemanticNode getWhatExpression()
      this method returns the expression that should be used to select a value from the active object.
      Returns:
      The expression that should be used to select a value from the active object.
    • getFromExpression

      public ISemanticNode getFromExpression()
      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.
    • getWhereExpression

      public ISemanticNode getWhereExpression()
      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

      public Identifier 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.
    • getChildNodes

      public ISemanticNode[] 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

      public void collectScopedObjects(ScopedObjects resultSet)
      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.
    • visit

      public void visit(ISemanticNodeVisitor visitor)
      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

      public String toString()
      Overrides:
      toString in class SemanticNodeBase