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
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_ARRAYFields inherited from interface groovy.lang.groovydoc.GroovydocHolder
DOC_COMMENT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<R> Raccept(GinqAstVisitor<R> visitor) Accepts a GINQ visitor.voidaddJoinExpression(JoinExpression joinExpression) Adds a join clause.Returns thefromclause.Returns thegroupbyclause.Returns the join clauses.Returns thelimitclause.Returns theorderbyclause.Returns theselectclause.getText()Returns the textual GINQ form of this expression.Returns thewhereclause.voidsetFromExpression(FromExpression fromExpression) Sets thefromclause.voidsetGroupExpression(GroupExpression groupExpression) Sets thegroupbyclause.voidsetLimitExpression(LimitExpression limitExpression) Sets thelimitclause.voidsetOrderExpression(OrderExpression orderExpression) Sets theorderbyclause.voidsetSelectExpression(SelectExpression selectExpression) Sets theselectclause.voidsetWhereExpression(WhereExpression whereExpression) Sets thewhereclause.toString()Returns the textual form of this expression.voidvisit(GroovyCodeVisitor visitor) Dispatches this expression to a GINQ-aware Groovy visitor.Methods inherited from class org.apache.groovy.ginq.dsl.expression.AbstractGinqExpression
transformExpressionMethods inherited from class org.codehaus.groovy.ast.expr.Expression
getType, setType, transformExpressions, transformExpressionsMethods inherited from class org.codehaus.groovy.ast.AnnotatedNode
addAnnotation, addAnnotation, addAnnotations, getAnnotations, getAnnotations, getDeclaringClass, getGroovydoc, getInstance, hasNoRealSourcePosition, isSynthetic, setDeclaringClass, setHasNoRealSourcePosition, setSyntheticMethods inherited from class org.codehaus.groovy.ast.ASTNode
copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getMetaDataMap, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setMetaDataMap, setSourcePositionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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
Dispatches this expression to a GINQ-aware Groovy visitor.- Overrides:
visitin classAbstractGinqExpression- Parameters:
visitor- the visitor to invoke
-
accept
Accepts a GINQ visitor.- Specified by:
acceptin classAbstractGinqExpression- Type Parameters:
R- the visit result type- Parameters:
visitor- the visitor to accept- Returns:
- the visit result
-
getFromExpression
Returns thefromclause.- Returns:
- the
fromclause
-
setFromExpression
Sets thefromclause.- Parameters:
fromExpression- the clause to set
-
getJoinExpressionList
Returns the join clauses.- Returns:
- the join clauses
-
addJoinExpression
Adds a join clause.- Parameters:
joinExpression- the clause to add
-
setWhereExpression
Sets thewhereclause.- Parameters:
whereExpression- the clause to set
-
getWhereExpression
Returns thewhereclause.- Returns:
- the
whereclause
-
getGroupExpression
Returns thegroupbyclause.- Returns:
- the
groupbyclause
-
setGroupExpression
Sets thegroupbyclause.- Parameters:
groupExpression- the clause to set
-
getOrderExpression
Returns theorderbyclause.- Returns:
- the
orderbyclause
-
setOrderExpression
Sets theorderbyclause.- Parameters:
orderExpression- the clause to set
-
getLimitExpression
Returns thelimitclause.- Returns:
- the
limitclause
-
setLimitExpression
Sets thelimitclause.- Parameters:
limitExpression- the clause to set
-
getSelectExpression
Returns theselectclause.- Returns:
- the
selectclause
-
setSelectExpression
Sets theselectclause.- Parameters:
selectExpression- the clause to set
-
getText
Returns the textual GINQ form of this expression. -
toString
Returns the textual form of this expression.
-