Class GinqExpression

All Implemented Interfaces:
GroovydocHolder<AnnotatedNode>, NodeMetaDataHandler

public class GinqExpression extends AbstractGinqExpression
Represents GINQ expression, which has the following structure:
     ginq
     |__ from
     |__ [innerjoin/leftjoin/rightjoin/fulljoin/crossjoin]*
     |   |__ on
     |__ [where]
     |__ [groupby] [into]
     |   |__ [having]
     |__ [orderby]
     |__ [limit]
     |__ select
 
(Note: [ ] means optional)
Since:
4.0.0
  • Constructor Details

    • GinqExpression

      public GinqExpression()
  • Method Details

    • visit

      public void visit(GroovyCodeVisitor visitor)
      Dispatches this expression to a GINQ-aware Groovy visitor.
      Overrides:
      visit in class AbstractGinqExpression
      Parameters:
      visitor - the visitor to invoke
    • accept

      public <R> R accept(GinqAstVisitor<R> visitor)
      Accepts a GINQ visitor.
      Specified by:
      accept in class AbstractGinqExpression
      Type Parameters:
      R - the visit result type
      Parameters:
      visitor - the visitor to accept
      Returns:
      the visit result
    • getFromExpression

      public FromExpression getFromExpression()
      Returns the from clause.
      Returns:
      the from clause
    • setFromExpression

      public void setFromExpression(FromExpression fromExpression)
      Sets the from clause.
      Parameters:
      fromExpression - the clause to set
    • getJoinExpressionList

      public List<JoinExpression> getJoinExpressionList()
      Returns the join clauses.
      Returns:
      the join clauses
    • addJoinExpression

      public void addJoinExpression(JoinExpression joinExpression)
      Adds a join clause.
      Parameters:
      joinExpression - the clause to add
    • setWhereExpression

      public void setWhereExpression(WhereExpression whereExpression)
      Sets the where clause.
      Parameters:
      whereExpression - the clause to set
    • getWhereExpression

      public WhereExpression getWhereExpression()
      Returns the where clause.
      Returns:
      the where clause
    • getGroupExpression

      public GroupExpression getGroupExpression()
      Returns the groupby clause.
      Returns:
      the groupby clause
    • setGroupExpression

      public void setGroupExpression(GroupExpression groupExpression)
      Sets the groupby clause.
      Parameters:
      groupExpression - the clause to set
    • getOrderExpression

      public OrderExpression getOrderExpression()
      Returns the orderby clause.
      Returns:
      the orderby clause
    • setOrderExpression

      public void setOrderExpression(OrderExpression orderExpression)
      Sets the orderby clause.
      Parameters:
      orderExpression - the clause to set
    • getLimitExpression

      public LimitExpression getLimitExpression()
      Returns the limit clause.
      Returns:
      the limit clause
    • setLimitExpression

      public void setLimitExpression(LimitExpression limitExpression)
      Sets the limit clause.
      Parameters:
      limitExpression - the clause to set
    • getSelectExpression

      public SelectExpression getSelectExpression()
      Returns the select clause.
      Returns:
      the select clause
    • setSelectExpression

      public void setSelectExpression(SelectExpression selectExpression)
      Sets the select clause.
      Parameters:
      selectExpression - the clause to set
    • getText

      public String getText()
      Returns the textual GINQ form of this expression.
      Overrides:
      getText in class ASTNode
      Returns:
      the expression text
    • toString

      public String toString()
      Returns the textual form of this expression.
      Overrides:
      toString in class Object
      Returns:
      the expression text