Package org.apache.groovy.ginq.dsl.expression

# Class GinqExpression

java.lang.Object
org.codehaus.groovy.ast.ASTNode
org.codehaus.groovy.ast.AnnotatedNode
org.codehaus.groovy.ast.expr.Expression
org.apache.groovy.ginq.dsl.expression.AbstractGinqExpression
org.apache.groovy.ginq.dsl.expression.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

- ## Field Summary

  ### Fields inherited from class org.codehaus.groovy.ast.expr.Expression

  `EMPTY_ARRAY`

  ### Fields inherited from interface groovy.lang.groovydoc.GroovydocHolder

  `DOC_COMMENT`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GinqExpression()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `<R> R`
  `accept(GinqAstVisitor<R> visitor)`
  Accepts a GINQ visitor.
  `void`
  `addJoinExpression(JoinExpression joinExpression)`
  Adds a join clause.
  `FromExpression`
  `getFromExpression()`
  Returns the `from` clause.
  `GroupExpression`
  `getGroupExpression()`
  Returns the `groupby` clause.
  `List<JoinExpression>`
  `getJoinExpressionList()`
  Returns the join clauses.
  `LimitExpression`
  `getLimitExpression()`
  Returns the `limit` clause.
  `OrderExpression`
  `getOrderExpression()`
  Returns the `orderby` clause.
  `SelectExpression`
  `getSelectExpression()`
  Returns the `select` clause.
  `String`
  `getText()`
  Returns the textual GINQ form of this expression.
  `WhereExpression`
  `getWhereExpression()`
  Returns the `where` clause.
  `void`
  `setFromExpression(FromExpression fromExpression)`
  Sets the `from` clause.
  `void`
  `setGroupExpression(GroupExpression groupExpression)`
  Sets the `groupby` clause.
  `void`
  `setLimitExpression(LimitExpression limitExpression)`
  Sets the `limit` clause.
  `void`
  `setOrderExpression(OrderExpression orderExpression)`
  Sets the `orderby` clause.
  `void`
  `setSelectExpression(SelectExpression selectExpression)`
  Sets the `select` clause.
  `void`
  `setWhereExpression(WhereExpression whereExpression)`
  Sets the `where` clause.
  `String`
  `toString()`
  Returns the textual form of this expression.
  `void`
  `visit(GroovyCodeVisitor visitor)`
  Dispatches this expression to a GINQ-aware Groovy visitor.

  ### Methods inherited from class org.apache.groovy.ginq.dsl.expression.AbstractGinqExpression

  `transformExpression`

  ### Methods inherited from class org.codehaus.groovy.ast.expr.Expression

  `getType, setType, transformExpressions, transformExpressions`

  ### Methods inherited from class org.codehaus.groovy.ast.AnnotatedNode

  `addAnnotation, addAnnotation, addAnnotations, getAnnotations, getAnnotations, getDeclaringClass, getGroovydoc, getInstance, hasNoRealSourcePosition, isSynthetic, setDeclaringClass, setHasNoRealSourcePosition, setSynthetic`

  ### Methods inherited from class org.codehaus.groovy.ast.ASTNode

  `copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getMetaDataMap, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setMetaDataMap, setSourcePosition`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

  ### Methods inherited from interface org.codehaus.groovy.ast.NodeMetaDataHandler

  `copyNodeMetaData, getMetaDataMap, getNodeMetaData, getNodeMetaData, getNodeMetaData, newMetaDataMap, putNodeMetaData, removeNodeMetaData, setMetaDataMap, setNodeMetaData`

- ## 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