Package org.hibernate.sql.ast.tree.from
Class MappedByTableGroup
- java.lang.Object
-
- org.hibernate.sql.ast.tree.from.DelegatingTableGroup
-
- org.hibernate.sql.ast.tree.from.MappedByTableGroup
-
- All Implemented Interfaces:
DomainResultProducer
,SqmPathInterpretation
,SqlSelectionProducer
,Expression
,ColumnReferenceQualifier
,TableGroup
,VirtualTableGroup
,SqlAstNode
public class MappedByTableGroup extends DelegatingTableGroup implements VirtualTableGroup
-
-
Constructor Summary
Constructors Constructor Description MappedByTableGroup(NavigablePath navigablePath, ModelPartContainer modelPart, TableGroup underlyingTableGroup, boolean fetched, TableGroup parentTableGroup, BiPredicate<NavigablePath,String> navigablePathChecker)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ModelPartContainer
getExpressionType()
The type for this expressionString
getGroupAlias()
If we want to use CTE for TableGroup rendering we will need to know the alias we can use for the groupModelPartContainer
getModelPart()
NavigablePath
getNavigablePath()
List<TableGroupJoin>
getNestedTableGroupJoins()
protected TableGroup
getTableGroup()
List<TableGroupJoin>
getTableGroupJoins()
TableReference
getTableReference(NavigablePath navigablePath, String tableExpression, boolean allowFkOptimization, boolean resolve)
Returns the table reference for the table expression, or null if not found.List<TableReferenceJoin>
getTableReferenceJoins()
boolean
isFetched()
boolean
isLateral()
boolean
isRealTableGroup()
TableReference
resolveTableReference(NavigablePath navigablePath, String tableExpression, boolean allowFkOptimization)
LikeColumnReferenceQualifier.getTableReference(NavigablePath, String, boolean, boolean)
, but will throw an exception if no table reference can be found, even after resolving possible table reference joins.void
visitNestedTableGroupJoins(Consumer<TableGroupJoin> consumer)
void
visitTableGroupJoins(Consumer<TableGroupJoin> consumer)
-
Methods inherited from class org.hibernate.sql.ast.tree.from.DelegatingTableGroup
accept, addNestedTableGroupJoin, addTableGroupJoin, applyAffectedTableNames, applySqlSelections, canUseInnerJoins, createDomainResult, createSqlSelection, getColumnReference, getPrimaryTableReference, getSourceAlias, getSqlExpression, getTableReference, getTableReference, isInitialized, prependTableGroupJoin, resolveTableReference, resolveTableReference
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.sql.ast.tree.from.ColumnReferenceQualifier
getTableReference, getTableReference, resolveTableReference, resolveTableReference
-
Methods inherited from interface org.hibernate.sql.ast.tree.expression.Expression
createSqlSelection, getColumnReference
-
Methods inherited from interface org.hibernate.query.sqm.sql.internal.SqmPathInterpretation
getSqlExpression
-
Methods inherited from interface org.hibernate.sql.ast.tree.from.TableGroup
accept, addNestedTableGroupJoin, addTableGroupJoin, applyAffectedTableNames, applySqlSelections, canUseInnerJoins, createDomainResult, getPrimaryTableReference, getSourceAlias, isInitialized, prependTableGroupJoin
-
-
-
-
Constructor Detail
-
MappedByTableGroup
public MappedByTableGroup(NavigablePath navigablePath, ModelPartContainer modelPart, TableGroup underlyingTableGroup, boolean fetched, TableGroup parentTableGroup, BiPredicate<NavigablePath,String> navigablePathChecker)
-
-
Method Detail
-
getTableGroup
protected TableGroup getTableGroup()
- Specified by:
getTableGroup
in classDelegatingTableGroup
-
getNavigablePath
public NavigablePath getNavigablePath()
- Specified by:
getNavigablePath
in interfaceSqmPathInterpretation
- Specified by:
getNavigablePath
in interfaceTableGroup
- Overrides:
getNavigablePath
in classDelegatingTableGroup
-
getExpressionType
public ModelPartContainer getExpressionType()
Description copied from interface:Expression
The type for this expression- Specified by:
getExpressionType
in interfaceExpression
- Specified by:
getExpressionType
in interfaceSqmPathInterpretation
- Overrides:
getExpressionType
in classDelegatingTableGroup
-
getGroupAlias
public String getGroupAlias()
Description copied from interface:TableGroup
If we want to use CTE for TableGroup rendering we will need to know the alias we can use for the group- Specified by:
getGroupAlias
in interfaceTableGroup
- Overrides:
getGroupAlias
in classDelegatingTableGroup
-
isFetched
public boolean isFetched()
- Specified by:
isFetched
in interfaceTableGroup
- Overrides:
isFetched
in classDelegatingTableGroup
-
getModelPart
public ModelPartContainer getModelPart()
- Specified by:
getModelPart
in interfaceTableGroup
- Overrides:
getModelPart
in classDelegatingTableGroup
-
isRealTableGroup
public boolean isRealTableGroup()
- Specified by:
isRealTableGroup
in interfaceTableGroup
- Overrides:
isRealTableGroup
in classDelegatingTableGroup
-
isLateral
public boolean isLateral()
- Specified by:
isLateral
in interfaceTableGroup
- Overrides:
isLateral
in classDelegatingTableGroup
-
getTableGroupJoins
public List<TableGroupJoin> getTableGroupJoins()
- Specified by:
getTableGroupJoins
in interfaceTableGroup
- Overrides:
getTableGroupJoins
in classDelegatingTableGroup
-
getNestedTableGroupJoins
public List<TableGroupJoin> getNestedTableGroupJoins()
- Specified by:
getNestedTableGroupJoins
in interfaceTableGroup
- Overrides:
getNestedTableGroupJoins
in classDelegatingTableGroup
-
visitTableGroupJoins
public void visitTableGroupJoins(Consumer<TableGroupJoin> consumer)
- Specified by:
visitTableGroupJoins
in interfaceTableGroup
- Overrides:
visitTableGroupJoins
in classDelegatingTableGroup
-
visitNestedTableGroupJoins
public void visitNestedTableGroupJoins(Consumer<TableGroupJoin> consumer)
- Specified by:
visitNestedTableGroupJoins
in interfaceTableGroup
- Overrides:
visitNestedTableGroupJoins
in classDelegatingTableGroup
-
getTableReferenceJoins
public List<TableReferenceJoin> getTableReferenceJoins()
- Specified by:
getTableReferenceJoins
in interfaceTableGroup
- Overrides:
getTableReferenceJoins
in classDelegatingTableGroup
-
resolveTableReference
public TableReference resolveTableReference(NavigablePath navigablePath, String tableExpression, boolean allowFkOptimization)
Description copied from interface:ColumnReferenceQualifier
LikeColumnReferenceQualifier.getTableReference(NavigablePath, String, boolean, boolean)
, but will throw an exception if no table reference can be found, even after resolving possible table reference joins.- Specified by:
resolveTableReference
in interfaceColumnReferenceQualifier
- Overrides:
resolveTableReference
in classDelegatingTableGroup
- Parameters:
navigablePath
- The path for which to look up the table reference, may be nulltableExpression
- The table expression for which to look up the table referenceallowFkOptimization
- Whether a foreign key optimization is allowed i.e. use the FK column on the key-side
-
getTableReference
public TableReference getTableReference(NavigablePath navigablePath, String tableExpression, boolean allowFkOptimization, boolean resolve)
Description copied from interface:ColumnReferenceQualifier
Returns the table reference for the table expression, or null if not found.- Specified by:
getTableReference
in interfaceColumnReferenceQualifier
- Overrides:
getTableReference
in classDelegatingTableGroup
- Parameters:
navigablePath
- The path for which to look up the table reference, may be nulltableExpression
- The table expression for which to look up the table referenceallowFkOptimization
- Whether a foreign key optimization is allowed i.e. use the FK column on the key-sideresolve
- Whether to potentially create table reference joins for this table group
-
-