Class JoinExpression

All Implemented Interfaces:
GroovydocHolder<AnnotatedNode>, DataSourceHolder, NodeMetaDataHandler

public class JoinExpression extends DataSourceExpression implements DataSourceHolder
Represents join expression
Since:
4.0.0
  • Field Details

    • SMART_INNER_JOIN

      public static final String SMART_INNER_JOIN
      Clause name for a smart inner join.
      See Also:
    • INNER_JOIN

      public static final String INNER_JOIN
      Clause name for a regular inner join.
      See Also:
    • INNER_HASH_JOIN

      public static final String INNER_HASH_JOIN
      Clause name for an inner hash join.
      See Also:
    • LEFT_HASH_JOIN

      public static final String LEFT_HASH_JOIN
      Clause name for a left hash join.
      See Also:
    • 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