Top Description Fields Constructors Methods
org.hibernate.query.sqm.tree.domain

public abstract Class AbstractSqmFrom<O, T>

extends AbstractSqmPath<T>
implements SqmFrom<O, T>
Class Inheritance
All Implemented Interfaces
org.hibernate.query.sqm.tree.from.SqmFrom, org.hibernate.query.criteria.JpaFrom, jakarta.persistence.criteria.From, jakarta.persistence.criteria.FetchParent, jakarta.persistence.criteria.Path, jakarta.persistence.criteria.Expression, jakarta.persistence.criteria.Selection, jakarta.persistence.TupleElement, org.hibernate.query.criteria.JpaFetchParent, org.hibernate.query.criteria.JpaPath, org.hibernate.query.criteria.JpaExpression, org.hibernate.query.criteria.JpaSelection, org.hibernate.query.criteria.JpaTupleElement, org.hibernate.query.criteria.JpaCriteriaNode, java.io.Serializable, org.hibernate.query.sqm.tree.domain.SqmPath, org.hibernate.query.hql.spi.SemanticPathPart, org.hibernate.query.sqm.tree.expression.SqmExpression, org.hibernate.query.sqm.tree.select.SqmSelectableNode, org.hibernate.query.sqm.tree.SqmTypedNode, org.hibernate.query.sqm.tree.SqmVisitableNode, org.hibernate.query.sqm.tree.SqmNode, org.hibernate.query.sqm.tree.SqmExpressibleAccessor
Known Direct Subclasses
org.hibernate.query.sqm.tree.domain.AbstractSqmJoin, org.hibernate.query.sqm.tree.from.SqmCrossJoin, org.hibernate.query.sqm.tree.from.SqmRoot
Imports
java.util.ArrayList, .Collections, .List, .Locale, .Objects, .Set, java.util.function.Consumer, java.util.stream.Collectors, org.hibernate.metamodel.mapping.ModelPartContainer, org.hibernate.metamodel.model.domain.BagPersistentAttribute, .EntityDomainType, .ListPersistentAttribute, .ManagedDomainType, .MapPersistentAttribute, .PluralPersistentAttribute, .SetPersistentAttribute, .SingularPersistentAttribute, org.hibernate.query.criteria.JpaCrossJoin, .JpaCteCriteria, .JpaDerivedJoin, .JpaJoinedFrom, .JpaEntityJoin, .JpaPath, .JpaSelection, org.hibernate.query.sqm.tree.cte.SqmCteStatement, org.hibernate.query.sqm.tree.from.SqmCteJoin, .SqmDerivedJoin, .SqmAttributeJoin, .SqmCrossJoin, .SqmEntityJoin, .SqmFrom, .SqmJoin, .SqmRoot, org.hibernate.query.sqm.tree.select.SqmSubQuery, org.hibernate.spi.NavigablePath, org.hibernate.query.SemanticException, org.hibernate.query.hql.spi.SqmCreationState, org.hibernate.query.sqm.NodeBuilder, .SqmPathSource, org.hibernate.query.sqm.spi.SqmCreationHelper, org.hibernate.query.sqm.tree.SqmCopyContext, .SqmJoinType, jakarta.persistence.criteria.Fetch, .Join, .JoinType, .Subquery, jakarta.persistence.metamodel.CollectionAttribute, .ListAttribute, .MapAttribute, .PluralAttribute, .SetAttribute, .SingularAttribute

Convenience base class for SqmFrom implementations
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private String
private List<SqmJoin<T, ?>>
private List<SqmFrom<?, ?>>

Constructor Summary

AccessConstructor and Description
protected
AbstractSqmFrom(NavigablePath navigablePath, SqmPathSource<T> referencedNavigable, SqmFrom<?, ?> lhs, String alias, NodeBuilder nodeBuilder)

protected
AbstractSqmFrom(EntityDomainType<T> entityType, String alias, NodeBuilder nodeBuilder)

Intended for use with SqmRoot

protected
AbstractSqmFrom(NavigablePath navigablePath, SqmPathSource<T> entityType, String alias, NodeBuilder nodeBuilder)

Intended for use with SqmTreatedRoot to SqmRoot

protected
AbstractSqmFrom(NavigablePath navigablePath, SqmPathSource<T> referencedNavigable, NodeBuilder nodeBuilder)

Intended for use with SqmCorrelatedRootJoin through SqmRoot

Method Summary

Modifier and TypeMethod and Description
public void
addSqmJoin(SqmJoin<T, ?> join)

Implements org.hibernate.query.sqm.tree.from.SqmFrom.addSqmJoin.

Add an associated join
protected <X extends SqmFrom<?, ?>> X
addTreat(X treat)

public JpaSelection<T>
public void
private <E> SqmBagJoin<T, E>
buildBagJoin(BagPersistentAttribute<? super T, E> attribute, SqmJoinType joinType, boolean fetched)

private <A> SqmAttributeJoin<T, A>
buildJoin(SqmPathSource<A> joinedPathSource, SqmJoinType joinType, boolean fetched)

private <E> SqmListJoin<T, E>
buildListJoin(ListPersistentAttribute<? super T, E> attribute, SqmJoinType joinType, boolean fetched)

private <K, V> SqmMapJoin<T, K, V>
buildMapJoin(MapPersistentAttribute<? super T, K, V> attribute, SqmJoinType joinType, boolean fetched)

private <E> SqmSetJoin<T, E>
buildSetJoin(SetPersistentAttribute<? super T, E> attribute, SqmJoinType joinType, boolean fetched)

private <A> SqmSingularJoin<T, A>
buildSingularJoin(SingularPersistentAttribute<? super T, A> attribute, SqmJoinType joinType, boolean fetched)

protected void
copyTo(AbstractSqmFrom<O, T> target, SqmCopyContext context)

public abstract SqmCorrelation<O, T>
public <X> JpaCrossJoin<X>
public <X> JpaCrossJoin<X>
public <A> SqmSingularJoin<T, A>
fetch(SingularAttribute<? super T, A>
target of the join
attribute
)

Implements org.hibernate.query.criteria.JpaFetchParent.fetch, jakarta.persistence.criteria.FetchParent.fetch.

Create a fetch join to the specified single-valued attribute using an inner join.
public <A> SqmSingularJoin<T, A>
fetch(SingularAttribute<? super T, A>
target of the join
attribute
,
JoinType
join type
jt
)

Implements org.hibernate.query.criteria.JpaFetchParent.fetch, jakarta.persistence.criteria.FetchParent.fetch.

Create a fetch join to the specified single-valued attribute using the given join type.
public <A> SqmAttributeJoin<T, A>
fetch(PluralAttribute<? super T, ?, A>
target of the join
attribute
)

Implements org.hibernate.query.criteria.JpaFetchParent.fetch, jakarta.persistence.criteria.FetchParent.fetch.

Create a fetch join to the specified collection-valued attribute using an inner join.
public <A> SqmAttributeJoin<T, A>
fetch(PluralAttribute<? super T, ?, A>
target of the join
attribute
,
JoinType
join type
jt
)

Implements org.hibernate.query.criteria.JpaFetchParent.fetch, jakarta.persistence.criteria.FetchParent.fetch.

Create a fetch join to the specified collection-valued attribute using the given join type.
public <X, A> SqmAttributeJoin<X, A>
fetch(String
name of the attribute for the target of the join
attributeName
)

Implements org.hibernate.query.criteria.JpaFetchParent.fetch, jakarta.persistence.criteria.FetchParent.fetch.

Create a fetch join to the specified attribute using an inner join.
public <X, A> SqmAttributeJoin<X, A>
fetch(String
name of the attribute for the target of the join
attributeName
,
JoinType
join type
jt
)

Implements org.hibernate.query.criteria.JpaFetchParent.fetch, jakarta.persistence.criteria.FetchParent.fetch.

Create a fetch join to the specified attribute using the given join type.
private ModelPartContainer
findModelPartContainer(SqmAttributeJoin<?, ?> attributeJoin, SqmCreationState creationState)

protected <S, X extends SqmFrom<?, S>> X
findTreat(EntityDomainType<S> targetType, String alias)

public SqmFrom<O, T>
getCorrelationParent()

Implements org.hibernate.query.sqm.tree.from.SqmFrom.getCorrelationParent.

Returns the parent From object from which the correlated From object has been obtained through correlation (use of a Subquery correlate method).
public String
public Set<Fetch<T, ?>>
public Set<Join<T, ?>>
getJoins()

Implements jakarta.persistence.criteria.From.getJoins.

Return the joins that have been made from this bound type.
public JpaPath<?>
getParentPath()

Overrides default org.hibernate.query.criteria.JpaPath.getParentPath.

Implements jakarta.persistence.criteria.Path.getParentPath.

Return the parent "node" in the path or null if no parent.
public List<SqmJoin<T, ?>>
getSqmJoins()

Implements org.hibernate.query.sqm.tree.from.SqmFrom.getSqmJoins.

The joins associated with this SqmFrom
public List<SqmFrom<?, ?>>
getSqmTreats()

Implements org.hibernate.query.sqm.tree.from.SqmFrom.getSqmTreats.

The treats associated with this SqmFrom
public boolean
public boolean
public boolean
isCorrelated()

Implements jakarta.persistence.criteria.From.isCorrelated.

Whether the From object has been obtained as a result of correlation (use of a Subquery correlate method).
public <A> SqmSingularJoin<T, A>
join(SingularAttribute<? super T, A>
target of the join
attribute
)

Implements org.hibernate.query.sqm.tree.from.SqmFrom.join.

Create an inner join to the specified single-valued attribute.
public <A> SqmSingularJoin<T, A>
join(SingularAttribute<? super T, A>
target of the join
attribute
,
JoinType
join type
jt
)

Implements org.hibernate.query.sqm.tree.from.SqmFrom.join.

Create a join to the specified single-valued attribute using the given join type.
public <A> SqmBagJoin<T, A>
join(CollectionAttribute<? super T, A>
target of the join
attribute
)

Implements org.hibernate.query.sqm.tree.from.SqmFrom.join.

Create an inner join to the specified Collection-valued attribute.
public <E> SqmBagJoin<T, E>
join(CollectionAttribute<? super T, E>
target of the join
attribute
,
JoinType
join type
jt
)

Implements org.hibernate.query.sqm.tree.from.SqmFrom.join.

Create a join to the specified Collection-valued attribute using the given join type.
public <E> SqmSetJoin<T, E>
join(SetAttribute<? super T, E>
target of the join
attribute
)

Implements org.hibernate.query.sqm.tree.from.SqmFrom.join.

Create an inner join to the specified Set-valued attribute.
public <E> SqmSetJoin<T, E>
join(SetAttribute<? super T, E>
target of the join
attribute
,
JoinType
join type
jt
)

Implements org.hibernate.query.sqm.tree.from.SqmFrom.join.

Create a join to the specified Set-valued attribute using the given join type.
public <E> SqmListJoin<T, E>
join(ListAttribute<? super T, E>
target of the join
attribute
)

Implements org.hibernate.query.sqm.tree.from.SqmFrom.join.

Create an inner join to the specified List-valued attribute.
public <E> SqmListJoin<T, E>
join(ListAttribute<? super T, E>
target of the join
attribute
,
JoinType
join type
jt
)

Implements org.hibernate.query.sqm.tree.from.SqmFrom.join.

Create a join to the specified List-valued attribute using the given join type.
public <K, V> SqmMapJoin<T, K, V>
join(MapAttribute<? super T, K, V>
target of the join
attribute
)

Implements org.hibernate.query.sqm.tree.from.SqmFrom.join.

Create an inner join to the specified Map-valued attribute.
public <K, V> SqmMapJoin<T, K, V>
join(MapAttribute<? super T, K, V>
target of the join
attribute
,
JoinType
join type
jt
)

Implements org.hibernate.query.sqm.tree.from.SqmFrom.join.

Create a join to the specified Map-valued attribute using the given join type.
public <X, Y> SqmAttributeJoin<X, Y>
join(String
name of the attribute for the target of the join
attributeName
)

Implements org.hibernate.query.sqm.tree.from.SqmFrom.join.

Create an inner join to the specified attribute.
public <X, Y> SqmAttributeJoin<X, Y>
join(String
name of the attribute for the target of the join
attributeName
,
JoinType
join type
jt
)

Implements org.hibernate.query.sqm.tree.from.SqmFrom.join.

Create a join to the specified attribute using the given join type.
public <X> JpaEntityJoin<X>
public <X> JpaEntityJoin<X>
public <X> JpaEntityJoin<X>
join(Class<X> entityJavaType, SqmJoinType joinType)

Implements org.hibernate.query.criteria.JpaFrom.join.

public <X> JpaEntityJoin<X>
public <X> JpaDerivedJoin<X>
public <X> JpaDerivedJoin<X>
public <X> JpaDerivedJoin<X>
join(Subquery<X> subquery, SqmJoinType joinType, boolean lateral)

Implements org.hibernate.query.criteria.JpaFrom.join.

public <X> JpaDerivedJoin<X>
join(Subquery<X> subquery, SqmJoinType joinType, boolean lateral, String alias)

public <X> JpaJoinedFrom<?, X>
public <X> JpaJoinedFrom<?, X>
public <X> JpaJoinedFrom<?, X>
join(JpaCteCriteria<X> cte, SqmJoinType joinType, String alias)

public <X, Y> SqmBagJoin<X, Y>
joinCollection(String
name of the attribute for the target of the join
attributeName
)

Implements org.hibernate.query.sqm.tree.from.SqmFrom.joinCollection.

Create an inner join to the specified Collection-valued attribute.
public <X, Y> SqmBagJoin<X, Y>
joinCollection(String
name of the attribute for the target of the join
attributeName
,
JoinType
join type
jt
)

Implements org.hibernate.query.sqm.tree.from.SqmFrom.joinCollection.

Create a join to the specified Collection-valued attribute using the given join type.
public <X> JpaDerivedJoin<X>
public <X> JpaDerivedJoin<X>
public <X, Y> SqmListJoin<X, Y>
joinList(String
name of the attribute for the target of the join
attributeName
)

Implements org.hibernate.query.sqm.tree.from.SqmFrom.joinList.

Create an inner join to the specified List-valued attribute.
public <X, Y> SqmListJoin<X, Y>
joinList(String
name of the attribute for the target of the join
attributeName
,
JoinType
join type
jt
)

Implements org.hibernate.query.sqm.tree.from.SqmFrom.joinList.

Create a join to the specified List-valued attribute using the given join type.
public <X, K, V> SqmMapJoin<X, K, V>
joinMap(String
name of the attribute for the target of the join
attributeName
)

Implements org.hibernate.query.sqm.tree.from.SqmFrom.joinMap.

Create an inner join to the specified Map-valued attribute.
public <X, K, V> SqmMapJoin<X, K, V>
joinMap(String
name of the attribute for the target of the join
attributeName
,
JoinType
join type
jt
)

Implements org.hibernate.query.sqm.tree.from.SqmFrom.joinMap.

Create a join to the specified Map-valued attribute using the given join type.
public <X, Y> SqmSetJoin<X, Y>
joinSet(String
name of the attribute for the target of the join
attributeName
)

Implements org.hibernate.query.sqm.tree.from.SqmFrom.joinSet.

Create an inner join to the specified Set-valued attribute.
public <X, Y> SqmSetJoin<X, Y>
joinSet(String
name of the attribute for the target of the join
attributeName
,
JoinType
join type
jt
)

Implements org.hibernate.query.sqm.tree.from.SqmFrom.joinSet.

Create a join to the specified Set-valued attribute using the given join type.
public SqmPath<?>
public void
private void
public void
visitSqmJoins(Consumer<SqmJoin<T, ?>> consumer)

Implements org.hibernate.query.sqm.tree.from.SqmFrom.visitSqmJoins.

Visit all associated joins
Inherited from org.hibernate.query.sqm.tree.domain.AbstractSqmPath:
copyTogetgetgetgetgetExpressiblegetLhsgetModelgetNavigablePathgetNavigablePathCopygetNodeTypegetReferencedPathSourcegetResolvedModelgetReusablePathgetReusablePathsgetTreatedPathregisterReusablePathresolvePathresolvePathtoStringtypevisitReusablePaths