Class JoinExpression
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.DataSourceExpression
org.apache.groovy.ginq.dsl.expression.JoinExpression
- All Implemented Interfaces:
GroovydocHolder<AnnotatedNode>,DataSourceHolder,NodeMetaDataHandler
Represents join expression
- Since:
- 4.0.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringClause name for an inner hash join.static final StringClause name for a regular inner join.All supported join clause names.static final StringClause name for a left hash join.static final StringClause name for a smart inner join.Fields inherited from class org.apache.groovy.ginq.dsl.expression.DataSourceExpression
aliasExpr, dataSourceExprFields inherited from class org.codehaus.groovy.ast.expr.Expression
EMPTY_ARRAYFields inherited from interface groovy.lang.groovydoc.GroovydocHolder
DOC_COMMENT -
Constructor Summary
ConstructorsConstructorDescriptionJoinExpression(String joinName, Expression aliasExpr, Expression dataSourceExpr) Creates a join clause. -
Method Summary
Modifier and TypeMethodDescription<R> Raccept(GinqAstVisitor<R> visitor) Accepts a visitor for this clause.Returns the preceding data-source expression.Returns the join keyword.Returns the optionalonclause.getText()Returns the textual GINQ form of this clause.booleanIndicates whether this clause is a cross join.booleanIndicates whether this clause is an inner hash join.booleanIndicates whether this clause is an inner join.static booleanisJoinExpression(String methodName) Checks whether the supplied method name denotes a join clause.booleanIndicates whether this clause is a left hash join.booleanIndicates whether this clause is a left join.booleanIndicates whether this clause is a smart inner join.voidsetDataSourceExpression(DataSourceExpression dataSourceExpression) Sets the preceding data-source expression.voidsetOnExpression(OnExpression onExpression) Sets the optionalonclause.toString()Returns the textual form of this clause.Methods inherited from class org.apache.groovy.ginq.dsl.expression.DataSourceExpression
getAliasExpr, getDataSourceExpr, setDataSourceExprMethods inherited from class org.apache.groovy.ginq.dsl.expression.AbstractGinqExpression
transformExpression, visitMethods 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
-
Field Details
-
SMART_INNER_JOIN
Clause name for a smart inner join.- See Also:
-
INNER_JOIN
Clause name for a regular inner join.- See Also:
-
INNER_HASH_JOIN
Clause name for an inner hash join.- See Also:
-
LEFT_HASH_JOIN
Clause name for a left hash join.- See Also:
-
JOIN_NAME_LIST
All supported join clause names.
-
-
Constructor Details
-
JoinExpression
Creates a join clause.- Parameters:
joinName- the join keywordaliasExpr- the join aliasdataSourceExpr- the join data source
-
-
Method Details
-
isJoinExpression
Checks whether the supplied method name denotes a join clause.- Parameters:
methodName- the method name to test- Returns:
trueif the method name is a join clause
-
isCrossJoin
public boolean isCrossJoin()Indicates whether this clause is a cross join.- Returns:
truefor a cross join
-
isSmartInnerJoin
public boolean isSmartInnerJoin()Indicates whether this clause is a smart inner join.- Returns:
truefor a smart inner join
-
isInnerJoin
public boolean isInnerJoin()Indicates whether this clause is an inner join.- Returns:
truefor an inner join
-
isInnerHashJoin
public boolean isInnerHashJoin()Indicates whether this clause is an inner hash join.- Returns:
truefor an inner hash join
-
isLeftJoin
public boolean isLeftJoin()Indicates whether this clause is a left join.- Returns:
truefor a left join
-
isLeftHashJoin
public boolean isLeftHashJoin()Indicates whether this clause is a left hash join.- Returns:
truefor a left hash join
-
accept
Accepts a visitor for this clause.- Specified by:
acceptin classAbstractGinqExpression- Type Parameters:
R- the visit result type- Parameters:
visitor- the visitor to accept- Returns:
- the visit result
-
getJoinName
Returns the join keyword.- Returns:
- the join keyword
-
getOnExpression
Returns the optionalonclause.- Returns:
- the
onclause, ornull
-
setOnExpression
Sets the optionalonclause.- Parameters:
onExpression- the clause to set
-
getDataSourceExpression
Returns the preceding data-source expression.- Specified by:
getDataSourceExpressionin interfaceDataSourceHolder- Returns:
- the preceding data source
-
setDataSourceExpression
Sets the preceding data-source expression.- Specified by:
setDataSourceExpressionin interfaceDataSourceHolder- Parameters:
dataSourceExpression- the preceding data source
-
getText
Returns the textual GINQ form of this clause. -
toString
Returns the textual form of this clause.
-