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

public Interface TableGroupJoinProducer

extends TableGroupProducer
Known Direct Subinterfaces
org.hibernate.metamodel.mapping.DiscriminatedAssociationModelPart, org.hibernate.metamodel.mapping.EmbeddableValuedModelPart, org.hibernate.metamodel.mapping.EntityAssociationMapping, org.hibernate.metamodel.mapping.PluralAttributeMapping
Known Direct Implementers
org.hibernate.metamodel.mapping.internal.OneToManyCollectionPart, org.hibernate.metamodel.mapping.internal.ToOneAttributeMapping, org.hibernate.query.derived.AnonymousTupleEntityValuedModelPart
Imports
java.util.function.Consumer, org.hibernate.spi.NavigablePath, org.hibernate.sql.ast.SqlAstJoinType, org.hibernate.sql.ast.spi.SqlAliasBase, .SqlAliasBaseGenerator, .SqlAstCreationContext, .SqlAstCreationState, org.hibernate.sql.ast.tree.predicate.Predicate

Author
Steve Ebersole

Method Summary

Modifier and TypeMethod and Description
public TableGroup
createRootTableGroupJoin(NavigablePath
The NavigablePath to the join
navigablePath
,
TableGroup
The join's (L)eft-(H)and (S)ide
lhs
,
String explicitSourceAlias, SqlAliasBase
A specific SqlAliasBase to use. May be null indicating one should be created using the SqlAliasBaseGenerator from creationState
explicitSqlAliasBase
,
SqlAstJoinType
An explicit join-type. May be null to signal that the join is for an implicit path.
sqlAstJoinType
,
boolean fetched, Consumer<Predicate>
Consumer for additional predicates from the producer's mapping.
predicateConsumer
,
SqlAstCreationState creationState)

Create the "join", but return a TableGroup.

public TableGroupJoin
createTableGroupJoin(NavigablePath
The NavigablePath to the join
navigablePath
,
TableGroup
The join's (L)eft-(H)and (S)ide
lhs
,
String explicitSourceAlias, SqlAliasBase
A specific SqlAliasBase to use. May be null indicating one should be created using the SqlAliasBaseGenerator from creationState
explicitSqlAliasBase
,
SqlAstJoinType
An explicit join-type. May be null to signal that the join is for an implicit path.
sqlAstJoinType
,
boolean fetched, boolean
Indicates there are explicit, additional predicates (from an SQM tree ON/WITH clause)
addsPredicate
,
SqlAstCreationState creationState)

Create a TableGroupJoin.

public default SqlAstJoinType
determineSqlJoinType(TableGroup lhs, SqlAstJoinType requestedJoinType, boolean fetched)

public SqlAstJoinType
public boolean
isSimpleJoinPredicate(Predicate predicate)

Returns whether the given predicate is a simple join predicate for this attribute.

Inherited from org.hibernate.sql.ast.tree.from.TableGroupProducer:
containsTableReferencegetSqlAliasStem

Method Detail

createRootTableGroupJoinback to summary
public TableGroup createRootTableGroupJoin(NavigablePath navigablePath, TableGroup lhs, String explicitSourceAlias, SqlAliasBase explicitSqlAliasBase, SqlAstJoinType sqlAstJoinType, boolean fetched, Consumer<Predicate> predicateConsumer, SqlAstCreationState creationState)

Create the "join", but return a TableGroup. Intended for creating sub-query correlations. E.g., given

    from SomeEntity e
    where exists (
        select 1
        from AnotherEntity a
        where e.association.attr = 1
    )
We call this for the `e.association` path.
Parameters
navigablePath:NavigablePath

The NavigablePath to the join

lhs:TableGroup

The join's (L)eft-(H)and (S)ide

explicitSqlAliasBase:SqlAliasBase

A specific SqlAliasBase to use. May be null indicating one should be created using the SqlAliasBaseGenerator from creationState

sqlAstJoinType:SqlAstJoinType

An explicit join-type. May be null to signal that the join is for an implicit path.

predicateConsumer:Consumer<Predicate>

Consumer for additional predicates from the producer's mapping.

createTableGroupJoinback to summary
public TableGroupJoin createTableGroupJoin(NavigablePath navigablePath, TableGroup lhs, String explicitSourceAlias, SqlAliasBase explicitSqlAliasBase, SqlAstJoinType sqlAstJoinType, boolean fetched, boolean addsPredicate, SqlAstCreationState creationState)

Create a TableGroupJoin.

Parameters
navigablePath:NavigablePath

The NavigablePath to the join

lhs:TableGroup

The join's (L)eft-(H)and (S)ide

explicitSqlAliasBase:SqlAliasBase

A specific SqlAliasBase to use. May be null indicating one should be created using the SqlAliasBaseGenerator from creationState

sqlAstJoinType:SqlAstJoinType

An explicit join-type. May be null to signal that the join is for an implicit path.

addsPredicate:boolean

Indicates there are explicit, additional predicates (from an SQM tree ON/WITH clause)

determineSqlJoinTypeback to summary
public default SqlAstJoinType determineSqlJoinType(TableGroup lhs, SqlAstJoinType requestedJoinType, boolean fetched)
getDefaultSqlAstJoinTypeback to summary
public SqlAstJoinType getDefaultSqlAstJoinType(TableGroup parentTableGroup)
isSimpleJoinPredicateback to summary
public boolean isSimpleJoinPredicate(Predicate predicate)

Returns whether the given predicate is a simple join predicate for this attribute. This is useful to understand if a predicate has additional conjunctions other than the FK related predicate.