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

## [Java] Class JoinExpression

- org.apache.groovy.ginq.dsl.expression.JoinExpression

- All Implemented Interfaces and Traits:
    DataSourceHolder

      public class JoinExpression
      extends DataSourceExpression
      implements DataSourceHolder

  Represents join expression

  Since:
    4.0.0

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static String` | `INNER_HASH_JOIN` | Clause name for an inner hash join.
    `static String` | `INNER_JOIN` | Clause name for a regular inner join.
    `static List<String>` | `JOIN_NAME_LIST` | All supported join clause names.
    `static String` | `LEFT_HASH_JOIN` | Clause name for a left hash join.
    `static String` | `SMART_INNER_JOIN` | Clause name for a smart inner join.

  - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class DataSourceExpression` | `aliasExpr, dataSourceExpr`
    `class Expression` | `EMPTY_ARRAY`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `JoinExpression(String joinName, Expression aliasExpr, Expression dataSourceExpr)` Creates a join clause.

  - ### Methods Summary

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

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class DataSourceExpression` | `getAliasExpr, getDataSourceExpr, setDataSourceExpr`
    `class AbstractGinqExpression` | `accept, transformExpression, visit`
    `class Expression` | `getType, setType, transformExpression, transformExpressions, transformExpressions`
    `class AnnotatedNode` | `addAnnotation, addAnnotation, addAnnotations, getAnnotations, getAnnotations, getDeclaringClass, getGroovydoc, getInstance, hasNoRealSourcePosition, isSynthetic, setDeclaringClass, setHasNoRealSourcePosition, setSynthetic`
    `class ASTNode` | `copyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getMetaDataMap, getText, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setMetaDataMap, setSourcePosition, visit`

- - ### Field Detail

    - #### public static final String INNER_HASH_JOIN

      Clause name for an inner hash join.

    - #### public static final String INNER_JOIN

      Clause name for a regular inner join.

    - #### public static final List<String> JOIN_NAME_LIST

      All supported join clause names.

    - #### public static final String LEFT_HASH_JOIN

      Clause name for a left hash join.

    - #### public static final String SMART_INNER_JOIN

      Clause name for a smart inner join.

  - ### Constructor Detail

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

    - #### <R> public R accept(GinqAstVisitor<R> visitor)

      Accepts a visitor for this clause.

      Parameters:
        `visitor` - the visitor to accept
      Type Parameters:
        `R` - the visit result type
      Returns:
        the visit result

    - #### public DataSourceExpression getDataSourceExpression()

      Returns the preceding data-source expression.

      Returns:
        the preceding data source

    - #### public String getJoinName()

      Returns the join keyword.

      Returns:
        the join keyword

    - #### public OnExpression getOnExpression()

      Returns the optional `on` clause.

      Returns:
        the `on` clause, or `null`

    - #### public String getText()

      Returns the textual GINQ form of this clause.

      Returns:
        the clause text

    - #### public boolean isCrossJoin()

      Indicates whether this clause is a cross join.

      Returns:
        `true` for a cross join

    - #### public boolean isInnerHashJoin()

      Indicates whether this clause is an inner hash join.

      Returns:
        `true` for an inner hash join

    - #### public boolean isInnerJoin()

      Indicates whether this clause is an inner join.

      Returns:
        `true` for an inner join

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

    - #### public boolean isLeftHashJoin()

      Indicates whether this clause is a left hash join.

      Returns:
        `true` for a left hash join

    - #### public boolean isLeftJoin()

      Indicates whether this clause is a left join.

      Returns:
        `true` for a left join

    - #### public boolean isSmartInnerJoin()

      Indicates whether this clause is a smart inner join.

      Returns:
        `true` for a smart inner join

    - #### public void setDataSourceExpression(DataSourceExpression dataSourceExpression)

      Sets the preceding data-source expression.

      Parameters:
        `dataSourceExpression` - the preceding data source

    - #### public void setOnExpression(OnExpression onExpression)

      Sets the optional `on` clause.

      Parameters:
        `onExpression` - the clause to set

    - #### public String toString()

      Returns the textual form of this clause.

      Returns:
        the clause text