Top Fields Constructors Methods
org.hibernate.sql.ast.tree.from

public abstract Class AbstractTableGroup

extends AbstractColumnReferenceQualifier
implements TableGroup
Class Inheritance
All Implemented Interfaces
org.hibernate.sql.ast.tree.from.TableGroup, org.hibernate.query.sqm.sql.internal.DomainResultProducer, org.hibernate.query.sqm.sql.internal.SqmPathInterpretation, org.hibernate.sql.ast.tree.expression.Expression, org.hibernate.sql.ast.spi.SqlSelectionProducer, org.hibernate.sql.ast.tree.SqlAstNode, org.hibernate.sql.ast.tree.from.ColumnReferenceQualifier
Known Direct Subclasses
org.hibernate.sql.ast.tree.from.CorrelatedTableGroup, org.hibernate.sql.ast.tree.from.FunctionTableGroup, org.hibernate.sql.ast.tree.from.QueryPartTableGroup, org.hibernate.sql.ast.tree.from.StandardTableGroup, org.hibernate.sql.ast.tree.from.StandardVirtualTableGroup, org.hibernate.sql.ast.tree.from.UnionTableGroup, org.hibernate.sql.ast.tree.from.ValuesTableGroup, org.hibernate.query.results.TableGroupImpl, org.hibernate.sql.ast.tree.cte.CteTableGroup
Imports
java.util.ArrayList, .Collections, .List, .NoSuchElementException, java.util.function.Consumer, org.hibernate.engine.spi.SessionFactoryImplementor, org.hibernate.metamodel.mapping.ModelPart, .ModelPartContainer, org.hibernate.spi.NavigablePath, org.hibernate.sql.ast.spi.SqlAliasBase

Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private final boolean
private final ModelPartContainer
private List<TableGroupJoin>
private final SessionFactoryImplementor
sessionFactory

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
private final String
private final SqlAliasBase
private List<TableGroupJoin>

Constructor Summary

AccessConstructor and Description
public
AbstractTableGroup(boolean canUseInnerJoins, NavigablePath navigablePath, ModelPartContainer modelPartContainer, String sourceAlias, SqlAliasBase sqlAliasBase, SessionFactoryImplementor sessionFactory)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.

Method Summary

Modifier and TypeMethod and Description
public void
addNestedTableGroupJoin(TableGroupJoin join)

Implements org.hibernate.sql.ast.tree.from.TableGroup.addNestedTableGroupJoin.

A nested table group join is a join against a table group, that is ensured to be joined against the primary table reference and table reference joins in isolation, prior to doing other table group joins e.g. select * from entity1 e left join ( collection_table c1 join association a on a.id = c1.target_id ) on c1.entity_id = e.id and c1.key = 1 is modeled as TableGroup( primaryTableReference = TableReference(entity1, e), tableGroupJoins = [ TableGroupJoin( TableGroup( primaryTableReference = TableReference(collection_table, c1), nestedTableGroupJoins = [ TableGroupJoin( TableGroup( primaryTableReference = TableReference(association, a) ) ) ] ) ) ] ) This is necessary to correctly retain the cardinality of an HQL join like e.g. from Entity1 e left join e.collectionAssociation c on key(c) = 1
public void
public boolean
public ModelPart
public String
getGroupAlias()

Implements org.hibernate.sql.ast.tree.from.TableGroup.getGroupAlias.

If we want to use CTE for TableGroup rendering we will need to know the alias we can use for the group
public ModelPartContainer
public NavigablePath
public List<TableGroupJoin>
protected SessionFactoryImplementor
public String
public SqlAliasBase
public List<TableGroupJoin>
public boolean
public void
prependTableGroupJoin(NavigablePath navigablePath, TableGroupJoin join)

Implements org.hibernate.sql.ast.tree.from.TableGroup.prependTableGroupJoin.

Adds the given table group join before a join as found via the given navigable path.
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public void
public void
Inherited from org.hibernate.sql.ast.tree.from.AbstractColumnReferenceQualifier:
getPrimaryTableReferencegetTableReferencegetTableReferenceJoins

Field Detail

canUseInnerJoinsback to summary
private final boolean canUseInnerJoins
modelPartContainerback to summary
private final ModelPartContainer modelPartContainer
nestedTableGroupJoinsback to summary
private List<TableGroupJoin> nestedTableGroupJoins
sessionFactoryback to summary
private final SessionFactoryImplementor sessionFactory

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

sourceAliasback to summary
private final String sourceAlias
sqlAliasBaseback to summary
private final SqlAliasBase sqlAliasBase
tableGroupJoinsback to summary
private List<TableGroupJoin> tableGroupJoins

Constructor Detail

AbstractTableGroupback to summary
public AbstractTableGroup(boolean canUseInnerJoins, NavigablePath navigablePath, ModelPartContainer modelPartContainer, String sourceAlias, SqlAliasBase sqlAliasBase, SessionFactoryImplementor sessionFactory)

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

Method Detail

addNestedTableGroupJoinback to summary
public void addNestedTableGroupJoin(TableGroupJoin join)

Implements org.hibernate.sql.ast.tree.from.TableGroup.addNestedTableGroupJoin.

Doc from org.hibernate.sql.ast.tree.from.TableGroup.addNestedTableGroupJoin.

A nested table group join is a join against a table group, that is ensured to be joined against the primary table reference and table reference joins in isolation, prior to doing other table group joins e.g. select * from entity1 e left join ( collection_table c1 join association a on a.id = c1.target_id ) on c1.entity_id = e.id and c1.key = 1 is modeled as TableGroup( primaryTableReference = TableReference(entity1, e), tableGroupJoins = [ TableGroupJoin( TableGroup( primaryTableReference = TableReference(collection_table, c1), nestedTableGroupJoins = [ TableGroupJoin( TableGroup( primaryTableReference = TableReference(association, a) ) ) ] ) ) ] ) This is necessary to correctly retain the cardinality of an HQL join like e.g. from Entity1 e left join e.collectionAssociation c on key(c) = 1

Annotations
@Override
addTableGroupJoinback to summary
public void addTableGroupJoin(TableGroupJoin join)

Implements org.hibernate.sql.ast.tree.from.TableGroup.addTableGroupJoin.

Annotations
@Override
canUseInnerJoinsback to summary
public boolean canUseInnerJoins()

Implements org.hibernate.sql.ast.tree.from.TableGroup.canUseInnerJoins.

Annotations
@Override
getExpressionTypeback to summary
public ModelPart getExpressionType()

Implements org.hibernate.query.sqm.sql.internal.SqmPathInterpretation.getExpressionType.

Doc from org.hibernate.sql.ast.tree.expression.Expression.getExpressionType.

The type for this expression

Annotations
@Override
getGroupAliasback to summary
public String getGroupAlias()

Implements org.hibernate.sql.ast.tree.from.TableGroup.getGroupAlias.

Doc from org.hibernate.sql.ast.tree.from.TableGroup.getGroupAlias.

If we want to use CTE for TableGroup rendering we will need to know the alias we can use for the group

Annotations
@Override
getModelPartback to summary
public ModelPartContainer getModelPart()

Implements org.hibernate.sql.ast.tree.from.TableGroup.getModelPart.

Annotations
@Override
getNavigablePathback to summary
public NavigablePath getNavigablePath()

Implements org.hibernate.sql.ast.tree.from.TableGroup.getNavigablePath.

Annotations
@Override
getNestedTableGroupJoinsback to summary
public List<TableGroupJoin> getNestedTableGroupJoins()

Implements org.hibernate.sql.ast.tree.from.TableGroup.getNestedTableGroupJoins.

Annotations
@Override
getSessionFactoryback to summary
protected SessionFactoryImplementor getSessionFactory()

Implements abstract org.hibernate.sql.ast.tree.from.AbstractColumnReferenceQualifier.getSessionFactory.

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

Annotations
@Override
getSourceAliasback to summary
public String getSourceAlias()

Implements org.hibernate.sql.ast.tree.from.TableGroup.getSourceAlias.

Annotations
@Override
getSqlAliasBaseback to summary
public SqlAliasBase getSqlAliasBase()
getTableGroupJoinsback to summary
public List<TableGroupJoin> getTableGroupJoins()

Implements org.hibernate.sql.ast.tree.from.TableGroup.getTableGroupJoins.

Annotations
@Override
isRealTableGroupback to summary
public boolean isRealTableGroup()

Overrides default org.hibernate.sql.ast.tree.from.TableGroup.isRealTableGroup.

Annotations
@Override
prependTableGroupJoinback to summary
public void prependTableGroupJoin(NavigablePath navigablePath, TableGroupJoin join)

Implements org.hibernate.sql.ast.tree.from.TableGroup.prependTableGroupJoin.

Doc from org.hibernate.sql.ast.tree.from.TableGroup.prependTableGroupJoin.

Adds the given table group join before a join as found via the given navigable path.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
visitNestedTableGroupJoinsback to summary
public void visitNestedTableGroupJoins(Consumer<TableGroupJoin> consumer)

Implements org.hibernate.sql.ast.tree.from.TableGroup.visitNestedTableGroupJoins.

Annotations
@Override
visitTableGroupJoinsback to summary
public void visitTableGroupJoins(Consumer<TableGroupJoin> consumer)

Implements org.hibernate.sql.ast.tree.from.TableGroup.visitTableGroupJoins.

Annotations
@Override