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

public Class MutatingTableReferenceGroupWrapper

extends Object
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
Imports
java.util.Collections, .List, java.util.function.Consumer, org.hibernate.metamodel.mapping.ModelPart, .ModelPartContainer, org.hibernate.spi.NavigablePath

Acts as a TableGroup for DML query operations. It is used to simply wrap the TableReference of the "mutating table"
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private final ModelPartContainer
private final NamedTableReference

Constructor Summary

AccessConstructor and Description
public

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 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>
public TableReference
public String
public List<TableGroupJoin>
public TableReference
getTableReference(NavigablePath
The path for which to look up the table reference, may be null
navigablePath
,
String
The table expression for which to look up the table reference
tableExpression
,
boolean
Whether to potentially create table reference joins for this table group
resolve
)

Implements org.hibernate.sql.ast.tree.from.ColumnReferenceQualifier.getTableReference.

Returns the table reference for the table expression, or null if not found.
public List<TableReferenceJoin>
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 void
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

modelPartback to summary
private final ModelPartContainer modelPart
mutatingTableReferenceback to summary
private final NamedTableReference mutatingTableReference

Constructor Detail

MutatingTableReferenceGroupWrapperback to summary
public MutatingTableReferenceGroupWrapper(NavigablePath navigablePath, ModelPartContainer modelPart, NamedTableReference mutatingTableReference)

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
applyAffectedTableNamesback to summary
public void applyAffectedTableNames(Consumer<String> nameCollector)

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

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
getPrimaryTableReferenceback to summary
public TableReference getPrimaryTableReference()

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

Annotations
@Override
getSourceAliasback to summary
public String getSourceAlias()

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

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

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

Annotations
@Override
getTableReferenceback to summary
public TableReference getTableReference(NavigablePath navigablePath, String tableExpression, boolean resolve)

Implements org.hibernate.sql.ast.tree.from.ColumnReferenceQualifier.getTableReference.

Doc from org.hibernate.sql.ast.tree.from.ColumnReferenceQualifier.getTableReference.

Returns the table reference for the table expression, or null if not found.

Parameters
navigablePath:NavigablePath

The path for which to look up the table reference, may be null

tableExpression:String

The table expression for which to look up the table reference

resolve:boolean

Whether to potentially create table reference joins for this table group

Annotations
@Override
getTableReferenceJoinsback to summary
public List<TableReferenceJoin> getTableReferenceJoins()

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

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