Package org.hibernate.sql.ast.internal
Class TableGroupHelper
- java.lang.Object
-
- org.hibernate.sql.ast.spi.AbstractSqlAstWalker
-
- org.hibernate.sql.ast.internal.TableGroupHelper
-
- All Implemented Interfaces:
SqlAstWalker
public class TableGroupHelper extends AbstractSqlAstWalker
A simple walker that checks if a predicate contains qualifiers.
-
-
Field Summary
Fields Modifier and Type Field Description static int
NO_TABLE_GROUP_REQUIRED
static int
REAL_TABLE_GROUP_REQUIRED
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static int
findReferenceJoinForPredicateSwap(TableGroup tableGroup, Predicate predicate)
Returns the index of a table reference join which can be swapped with the primary table reference to avoid rendering a real nested table group.void
visitAggregateColumnWriteExpression(AggregateColumnWriteExpression aggregateColumnWriteExpression)
void
visitColumnReference(ColumnReference columnReference)
void
visitColumnWriteFragment(ColumnWriteFragment columnWriteFragment)
void
visitFilterFragmentPredicate(FilterPredicate.FilterFragmentPredicate fragmentPredicate)
void
visitFilterPredicate(FilterPredicate filterPredicate)
void
visitNamedTableReference(NamedTableReference tableReference)
void
visitSelfRenderingExpression(SelfRenderingExpression expression)
void
visitSqlFragmentPredicate(SqlFragmentPredicate predicate)
-
Methods inherited from class org.hibernate.sql.ast.spi.AbstractSqlAstWalker
visitAny, visitAssignment, visitBetweenPredicate, visitBinaryArithmeticExpression, visitBooleanExpressionPredicate, visitCaseSearchedExpression, visitCaseSimpleExpression, visitCastTarget, visitCollation, visitConversion, visitCustomTableDelete, visitCustomTableInsert, visitCustomTableUpdate, visitDeleteStatement, visitDistinct, visitDuration, visitDurationUnit, visitEmbeddableTypeLiteral, visitEntityTypeLiteral, visitEvery, visitExistsPredicate, visitExtractUnit, visitFormat, visitFromClause, visitFunctionTableReference, visitGroupedPredicate, visitInArrayPredicate, visitInListPredicate, visitInsertStatement, visitInSubQueryPredicate, visitJdbcLiteral, visitJunction, visitLikePredicate, visitModifiedSubQueryExpression, visitNegatedPredicate, visitNestedColumnReference, visitNullnessPredicate, visitOffsetFetchClause, visitOptionalTableUpdate, visitOver, visitOverflow, visitParameter, visitQueryGroup, visitQueryLiteral, visitQueryPartTableReference, visitQuerySpec, visitRelationalPredicate, visitSelectClause, visitSelectStatement, visitSelfRenderingPredicate, visitSortSpecification, visitSqlSelection, visitSqlSelectionExpression, visitStandardTableDelete, visitStandardTableInsert, visitStandardTableUpdate, visitStar, visitSummarization, visitTableGroup, visitTableGroupJoin, visitTableReferenceJoin, visitThruthnessPredicate, visitTrimSpecification, visitTuple, visitUnaryOperationExpression, visitUnparsedNumericLiteral, visitUpdateStatement, visitValuesTableReference
-
-
-
-
Field Detail
-
REAL_TABLE_GROUP_REQUIRED
public static final int REAL_TABLE_GROUP_REQUIRED
- See Also:
- Constant Field Values
-
NO_TABLE_GROUP_REQUIRED
public static final int NO_TABLE_GROUP_REQUIRED
- See Also:
- Constant Field Values
-
-
Method Detail
-
findReferenceJoinForPredicateSwap
public static int findReferenceJoinForPredicateSwap(TableGroup tableGroup, Predicate predicate)
Returns the index of a table reference join which can be swapped with the primary table reference to avoid rendering a real nested table group.REAL_TABLE_GROUP_REQUIRED
is returned if swapping is not possible.#NO_TABLE_GROUP_REQUIRED
is returned if no swapping is necessary.
-
visitSelfRenderingExpression
public void visitSelfRenderingExpression(SelfRenderingExpression expression)
- Specified by:
visitSelfRenderingExpression
in interfaceSqlAstWalker
- Overrides:
visitSelfRenderingExpression
in classAbstractSqlAstWalker
-
visitNamedTableReference
public void visitNamedTableReference(NamedTableReference tableReference)
- Specified by:
visitNamedTableReference
in interfaceSqlAstWalker
- Overrides:
visitNamedTableReference
in classAbstractSqlAstWalker
-
visitColumnReference
public void visitColumnReference(ColumnReference columnReference)
- Specified by:
visitColumnReference
in interfaceSqlAstWalker
- Overrides:
visitColumnReference
in classAbstractSqlAstWalker
-
visitAggregateColumnWriteExpression
public void visitAggregateColumnWriteExpression(AggregateColumnWriteExpression aggregateColumnWriteExpression)
- Specified by:
visitAggregateColumnWriteExpression
in interfaceSqlAstWalker
- Overrides:
visitAggregateColumnWriteExpression
in classAbstractSqlAstWalker
-
visitFilterPredicate
public void visitFilterPredicate(FilterPredicate filterPredicate)
- Specified by:
visitFilterPredicate
in interfaceSqlAstWalker
- Overrides:
visitFilterPredicate
in classAbstractSqlAstWalker
-
visitFilterFragmentPredicate
public void visitFilterFragmentPredicate(FilterPredicate.FilterFragmentPredicate fragmentPredicate)
- Specified by:
visitFilterFragmentPredicate
in interfaceSqlAstWalker
- Overrides:
visitFilterFragmentPredicate
in classAbstractSqlAstWalker
-
visitSqlFragmentPredicate
public void visitSqlFragmentPredicate(SqlFragmentPredicate predicate)
- Specified by:
visitSqlFragmentPredicate
in interfaceSqlAstWalker
- Overrides:
visitSqlFragmentPredicate
in classAbstractSqlAstWalker
-
visitColumnWriteFragment
public void visitColumnWriteFragment(ColumnWriteFragment columnWriteFragment)
- Specified by:
visitColumnWriteFragment
in interfaceSqlAstWalker
- Overrides:
visitColumnWriteFragment
in classAbstractSqlAstWalker
-
-