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

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

public class JoinExpression extends DataSourceExpression implements DataSourceHolder
Represents join expression

Since:
  4.0.0

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `INNER_HASH_JOIN`
  Clause name for an inner hash join.
  `static final String`
  `INNER_JOIN`
  Clause name for a regular inner join.
  `static final List<String>`
  `JOIN_NAME_LIST`
  All supported join clause names.
  `static final String`
  `LEFT_HASH_JOIN`
  Clause name for a left hash join.
  `static final String`
  `SMART_INNER_JOIN`
  Clause name for a smart inner join.

  ### Fields inherited from class org.apache.groovy.ginq.dsl.expression.DataSourceExpression

  `aliasExpr, dataSourceExpr`

  ### 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
  `JoinExpression(String joinName, Expression aliasExpr, Expression dataSourceExpr)`
  Creates a join clause.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `<R> R`
  `accept(GinqAstVisitor<R> visitor)`
  Accepts a visitor for this clause.
  `DataSourceExpression`
  `getDataSourceExpression()`
  Returns the preceding data-source expression.
  `String`
  `getJoinName()`
  Returns the join keyword.
  `OnExpression`
  `getOnExpression()`
  Returns the optional `on` clause.
  `String`
  `getText()`
  Returns the textual GINQ form of this clause.
  `boolean`
  `isCrossJoin()`
  Indicates whether this clause is a cross join.
  `boolean`
  `isInnerHashJoin()`
  Indicates whether this clause is an inner hash join.
  `boolean`
  `isInnerJoin()`
  Indicates whether this clause is an inner join.
  `static boolean`
  `isJoinExpression(String methodName)`
  Checks whether the supplied method name denotes a join clause.
  `boolean`
  `isLeftHashJoin()`
  Indicates whether this clause is a left hash join.
  `boolean`
  `isLeftJoin()`
  Indicates whether this clause is a left join.
  `boolean`
  `isSmartInnerJoin()`
  Indicates whether this clause is a smart inner join.
  `void`
  `setDataSourceExpression(DataSourceExpression dataSourceExpression)`
  Sets the preceding data-source expression.
  `void`
  `setOnExpression(OnExpression onExpression)`
  Sets the optional `on` clause.
  `String`
  `toString()`
  Returns the textual form of this clause.

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

  `getAliasExpr, getDataSourceExpr, setDataSourceExpr`

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

  `transformExpression, visit`

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

- ## Field Details

  - ### SMART_INNER_JOIN

    public static final String SMART_INNER_JOIN
    Clause name for a smart inner join.
    See Also:
      - Constant Field Values

  - ### INNER_JOIN

    public static final String INNER_JOIN
    Clause name for a regular inner join.
    See Also:
      - Constant Field Values

  - ### INNER_HASH_JOIN

    public static final String INNER_HASH_JOIN
    Clause name for an inner hash join.
    See Also:
      - Constant Field Values

  - ### LEFT_HASH_JOIN

    public static final String LEFT_HASH_JOIN
    Clause name for a left hash join.
    See Also:
      - Constant Field Values

  - ### JOIN_NAME_LIST

    public static final List<String> JOIN_NAME_LIST
    All supported join clause names.

- ## Constructor Details

  - ### JoinExpression

    public JoinExpression(String joinName, Expression aliasExpr, Expression dataSourceExpr)
    Creates a join clause.
    Parameters:
      `joinName` - the join keyword
      `aliasExpr` - the join alias
      `dataSourceExpr` - the join data source

- ## Method Details

  - ### isJoinExpression

    public static boolean isJoinExpression(String methodName)
    Checks whether the supplied method name denotes a join clause.
    Parameters:
      `methodName` - the method name to test
    Returns:
      `true` if the method name is a join clause

  - ### isCrossJoin

    public boolean isCrossJoin()
    Indicates whether this clause is a cross join.
    Returns:
      `true` for a cross join

  - ### isSmartInnerJoin

    public boolean isSmartInnerJoin()
    Indicates whether this clause is a smart inner join.
    Returns:
      `true` for a smart inner join

  - ### isInnerJoin

    public boolean isInnerJoin()
    Indicates whether this clause is an inner join.
    Returns:
      `true` for an inner join

  - ### isInnerHashJoin

    public boolean isInnerHashJoin()
    Indicates whether this clause is an inner hash join.
    Returns:
      `true` for an inner hash join

  - ### isLeftJoin

    public boolean isLeftJoin()
    Indicates whether this clause is a left join.
    Returns:
      `true` for a left join

  - ### isLeftHashJoin

    public boolean isLeftHashJoin()
    Indicates whether this clause is a left hash join.
    Returns:
      `true` for a left hash join

  - ### accept

    public <R> R accept(GinqAstVisitor<R> visitor)
    Accepts a visitor for this clause.
    Specified by:
      `accept` in class `AbstractGinqExpression`
    Type Parameters:
      `R` - the visit result type
    Parameters:
      `visitor` - the visitor to accept
    Returns:
      the visit result

  - ### getJoinName

    public String getJoinName()
    Returns the join keyword.
    Returns:
      the join keyword

  - ### getOnExpression

    public OnExpression getOnExpression()
    Returns the optional `on` clause.
    Returns:
      the `on` clause, or `null`

  - ### setOnExpression

    public void setOnExpression(OnExpression onExpression)
    Sets the optional `on` clause.
    Parameters:
      `onExpression` - the clause to set

  - ### getDataSourceExpression

    public DataSourceExpression getDataSourceExpression()
    Returns the preceding data-source expression.
    Specified by:
      `getDataSourceExpression` in interface `DataSourceHolder`
    Returns:
      the preceding data source

  - ### setDataSourceExpression

    public void setDataSourceExpression(DataSourceExpression dataSourceExpression)
    Sets the preceding data-source expression.
    Specified by:
      `setDataSourceExpression` in interface `DataSourceHolder`
    Parameters:
      `dataSourceExpression` - the preceding data source

  - ### getText

    public String getText()
    Returns the textual GINQ form of this clause.
    Overrides:
      `getText` in class `ASTNode`
    Returns:
      the clause text

  - ### toString

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