Top Description Methods
org.hibernate.query.sqm.tree.from

public Interface SqmFrom<O, T>

extends SqmVisitableNode, SqmPath<T>, JpaFrom<O, T>
Known Direct Subinterfaces
org.hibernate.query.sqm.tree.from.SqmJoin, org.hibernate.query.sqm.tree.domain.SqmCorrelation
Known Direct Implementers
org.hibernate.query.sqm.tree.domain.AbstractSqmFrom
Imports
java.util.List, java.util.function.Consumer, jakarta.persistence.criteria.CollectionJoin, .JoinType, .ListJoin, .MapJoin, .SetJoin, jakarta.persistence.metamodel.CollectionAttribute, .ListAttribute, .MapAttribute, .SetAttribute, .SingularAttribute, org.hibernate.metamodel.model.domain.EntityDomainType, org.hibernate.query.PathException, org.hibernate.query.criteria.JpaFrom, .JpaJoin, .JpaPath, org.hibernate.query.hql.spi.SqmCreationState, org.hibernate.query.sqm.SqmPathSource, org.hibernate.query.sqm.tree.SqmCopyContext, .SqmVisitableNode, org.hibernate.query.sqm.tree.domain.SqmBagJoin, .SqmListJoin, .SqmMapJoin, .SqmPath, .SqmSetJoin, .SqmSingularJoin

Models a Bindable's inclusion in the FROM clause.
Author
Steve Ebersole

Method Summary

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

Add an associated join

public SqmFrom<O, T>
public SqmFrom<O, T>
getCorrelationParent()

Redeclares org.hibernate.query.criteria.JpaFrom.getCorrelationParent.

Returns the parent From object from which the correlated From object has been obtained through correlation (use of a Subquery correlate method).
public SqmPathSource<T>
getReferencedPathSource()

Redeclares org.hibernate.query.sqm.tree.domain.SqmPath.getReferencedPathSource.

The Navigable for an SqmFrom will always be a NavigableContainer The path source that this path refers to (and that most likely created it).
public List<SqmJoin<T, ?>>
getSqmJoins()

The joins associated with this SqmFrom

public List<SqmFrom<?, ?>>
getSqmTreats()

The treats associated with this SqmFrom

public boolean
public boolean
public <A> SqmSingularJoin<T, A>
join(SingularAttribute<? super T, A>
target of the join
attribute
)

Redeclares org.hibernate.query.criteria.JpaFrom.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
)

Redeclares org.hibernate.query.criteria.JpaFrom.join.

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

Redeclares org.hibernate.query.criteria.JpaFrom.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
)

Redeclares org.hibernate.query.criteria.JpaFrom.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
set
)

Redeclares org.hibernate.query.criteria.JpaFrom.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
set
,
JoinType
join type
jt
)

Redeclares org.hibernate.query.criteria.JpaFrom.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
list
)

Redeclares org.hibernate.query.criteria.JpaFrom.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
list
,
JoinType
join type
jt
)

Redeclares org.hibernate.query.criteria.JpaFrom.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
map
)

Redeclares org.hibernate.query.criteria.JpaFrom.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
map
,
JoinType
join type
jt
)

Redeclares org.hibernate.query.criteria.JpaFrom.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
)

Redeclares org.hibernate.query.criteria.JpaFrom.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
)

Redeclares org.hibernate.query.criteria.JpaFrom.join.

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

Redeclares org.hibernate.query.criteria.JpaFrom.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
)

Redeclares org.hibernate.query.criteria.JpaFrom.joinCollection.

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

Redeclares org.hibernate.query.criteria.JpaFrom.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
)

Redeclares org.hibernate.query.criteria.JpaFrom.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
)

Redeclares org.hibernate.query.criteria.JpaFrom.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
)

Redeclares org.hibernate.query.criteria.JpaFrom.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
)

Redeclares org.hibernate.query.criteria.JpaFrom.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
)

Redeclares org.hibernate.query.criteria.JpaFrom.joinSet.

Create a join to the specified Set-valued attribute using the given join type.
public <S extends T> SqmFrom<?, S>
treatAs(Class<S> treatAsType)

Redeclares org.hibernate.query.sqm.tree.domain.SqmPath.treatAs, org.hibernate.query.criteria.JpaPath.treatAs.

Support for JPA's explicit (TREAT) down-casting.
public <S extends T> SqmFrom<?, S>
treatAs(EntityDomainType<S> treatAsType)

Redeclares org.hibernate.query.sqm.tree.domain.SqmPath.treatAs, org.hibernate.query.criteria.JpaPath.treatAs.

Support for JPA's explicit (TREAT) down-casting.
public <S extends T> SqmFrom<?, S>
treatAs(Class<S> treatJavaType, String alias)

public <S extends T> SqmFrom<?, S>
treatAs(EntityDomainType<S> treatTarget, String alias)

public void
visitSqmJoins(Consumer<SqmJoin<T, ?>> consumer)

Visit all associated joins

Inherited from org.hibernate.query.criteria.JpaFrom:
crossJoincrossJoinjoinjoinjoinjoinjoinjoinjoinjoinjoinjoinLateraljoinLateral
Inherited from org.hibernate.query.sqm.tree.domain.SqmPath:
applyInferableTypefindRootgetgetgetgetgetExplicitAliasgetJavaTypeDescriptorgetLhsgetNavigablePathgetNodeTypegetResolvedModelgetReusablePathgetReusablePathsregisterReusablePathresolveAliasresolveIndexedAccessresolvePathPartsetExplicitAliastypevisitReusablePaths
Inherited from org.hibernate.query.sqm.tree.SqmVisitableNode:
acceptappendHqlStringtoHqlString

Method Detail

addSqmJoinback to summary
public void addSqmJoin(SqmJoin<T, ?> join)

Add an associated join

copyback to summary
public SqmFrom<O, T> copy(SqmCopyContext context)

Redeclares org.hibernate.query.sqm.tree.SqmNode.copy, org.hibernate.query.sqm.tree.domain.SqmPath.copy.

Annotations
@Override
getCorrelationParentback to summary
public SqmFrom<O, T> getCorrelationParent()

Redeclares org.hibernate.query.criteria.JpaFrom.getCorrelationParent.

Doc from jakarta.persistence.criteria.From.getCorrelationParent.

Returns the parent From object from which the correlated From object has been obtained through correlation (use of a Subquery correlate method).

Returns:SqmFrom<O, T>

the parent of the correlated From object

Annotations
@Override
getReferencedPathSourceback to summary
public SqmPathSource<T> getReferencedPathSource()

Redeclares org.hibernate.query.sqm.tree.domain.SqmPath.getReferencedPathSource.

Doc from org.hibernate.query.sqm.tree.domain.SqmPath.getReferencedPathSource.

The Navigable for an SqmFrom will always be a NavigableContainer The path source that this path refers to (and that most likely created it).

Annotations
@Override
getSqmJoinsback to summary
public List<SqmJoin<T, ?>> getSqmJoins()

The joins associated with this SqmFrom

getSqmTreatsback to summary
public List<SqmFrom<?, ?>> getSqmTreats()

The treats associated with this SqmFrom

hasJoinsback to summary
public boolean hasJoins()
hasTreatsback to summary
public boolean hasTreats()
joinback to summary
public <A> SqmSingularJoin<T, A> join(SingularAttribute<? super T, A> attribute)

Redeclares org.hibernate.query.criteria.JpaFrom.join.

Doc from jakarta.persistence.criteria.From.join.

Create an inner join to the specified single-valued attribute.

Parameters
attribute:SingularAttribute<? super T, A>

target of the join

Returns:SqmSingularJoin<T, A>

the resulting join

Annotations
@Override
joinback to summary
public <A> SqmSingularJoin<T, A> join(SingularAttribute<? super T, A> attribute, JoinType jt)

Redeclares org.hibernate.query.criteria.JpaFrom.join.

Doc from jakarta.persistence.criteria.From.join.

Create a join to the specified single-valued attribute using the given join type.

Parameters
attribute:SingularAttribute<? super T, A>

target of the join

jt:JoinType

join type

Returns:SqmSingularJoin<T, A>

the resulting join

Annotations
@Override
joinback to summary
public <E> SqmBagJoin<T, E> join(CollectionAttribute<? super T, E> attribute)

Redeclares org.hibernate.query.criteria.JpaFrom.join.

Doc from jakarta.persistence.criteria.From.join.

Create an inner join to the specified Collection-valued attribute.

Parameters
attribute:CollectionAttribute<? super T, E>

target of the join

Returns:SqmBagJoin<T, E>

the resulting join

Annotations
@Override
joinback to summary
public <E> SqmBagJoin<T, E> join(CollectionAttribute<? super T, E> attribute, JoinType jt)

Redeclares org.hibernate.query.criteria.JpaFrom.join.

Doc from jakarta.persistence.criteria.From.join.

Create a join to the specified Collection-valued attribute using the given join type.

Parameters
attribute:CollectionAttribute<? super T, E>

target of the join

jt:JoinType

join type

Returns:SqmBagJoin<T, E>

the resulting join

Annotations
@Override
joinback to summary
public <E> SqmSetJoin<T, E> join(SetAttribute<? super T, E> set)

Redeclares org.hibernate.query.criteria.JpaFrom.join.

Doc from jakarta.persistence.criteria.From.join.

Create an inner join to the specified Set-valued attribute.

Parameters
set:SetAttribute<? super T, E>

target of the join

Returns:SqmSetJoin<T, E>

the resulting join

Annotations
@Override
joinback to summary
public <E> SqmSetJoin<T, E> join(SetAttribute<? super T, E> set, JoinType jt)

Redeclares org.hibernate.query.criteria.JpaFrom.join.

Doc from jakarta.persistence.criteria.From.join.

Create a join to the specified Set-valued attribute using the given join type.

Parameters
set:SetAttribute<? super T, E>

target of the join

jt:JoinType

join type

Returns:SqmSetJoin<T, E>

the resulting join

Annotations
@Override
joinback to summary
public <E> SqmListJoin<T, E> join(ListAttribute<? super T, E> list)

Redeclares org.hibernate.query.criteria.JpaFrom.join.

Doc from jakarta.persistence.criteria.From.join.

Create an inner join to the specified List-valued attribute.

Parameters
list:ListAttribute<? super T, E>

target of the join

Returns:SqmListJoin<T, E>

the resulting join

Annotations
@Override
joinback to summary
public <E> SqmListJoin<T, E> join(ListAttribute<? super T, E> list, JoinType jt)

Redeclares org.hibernate.query.criteria.JpaFrom.join.

Doc from jakarta.persistence.criteria.From.join.

Create a join to the specified List-valued attribute using the given join type.

Parameters
list:ListAttribute<? super T, E>

target of the join

jt:JoinType

join type

Returns:SqmListJoin<T, E>

the resulting join

Annotations
@Override
joinback to summary
public <K, V> SqmMapJoin<T, K, V> join(MapAttribute<? super T, K, V> map)

Redeclares org.hibernate.query.criteria.JpaFrom.join.

Doc from jakarta.persistence.criteria.From.join.

Create an inner join to the specified Map-valued attribute.

Parameters
map:MapAttribute<? super T, K, V>

target of the join

Returns:SqmMapJoin<T, K, V>

the resulting join

Annotations
@Override
joinback to summary
public <K, V> SqmMapJoin<T, K, V> join(MapAttribute<? super T, K, V> map, JoinType jt)

Redeclares org.hibernate.query.criteria.JpaFrom.join.

Doc from jakarta.persistence.criteria.From.join.

Create a join to the specified Map-valued attribute using the given join type.

Parameters
map:MapAttribute<? super T, K, V>

target of the join

jt:JoinType

join type

Returns:SqmMapJoin<T, K, V>

the resulting join

Annotations
@Override
joinback to summary
public <X, Y> SqmAttributeJoin<X, Y> join(String attributeName)

Redeclares org.hibernate.query.criteria.JpaFrom.join.

Doc from jakarta.persistence.criteria.From.join.

Create an inner join to the specified attribute.

Parameters
attributeName:String

name of the attribute for the target of the join

Returns:SqmAttributeJoin<X, Y>

the resulting join

Annotations
@Override
joinback to summary
public <X, Y> SqmAttributeJoin<X, Y> join(String attributeName, JoinType jt)

Redeclares org.hibernate.query.criteria.JpaFrom.join.

Doc from jakarta.persistence.criteria.From.join.

Create a join to the specified attribute using the given join type.

Parameters
attributeName:String

name of the attribute for the target of the join

jt:JoinType

join type

Returns:SqmAttributeJoin<X, Y>

the resulting join

Annotations
@Override
joinCollectionback to summary
public <X, Y> SqmBagJoin<X, Y> joinCollection(String attributeName)

Redeclares org.hibernate.query.criteria.JpaFrom.joinCollection.

Doc from jakarta.persistence.criteria.From.joinCollection.

Create an inner join to the specified Collection-valued attribute.

Parameters
attributeName:String

name of the attribute for the target of the join

Returns:SqmBagJoin<X, Y>

the resulting join

Annotations
@Override
joinCollectionback to summary
public <X, Y> SqmBagJoin<X, Y> joinCollection(String attributeName, JoinType jt)

Redeclares org.hibernate.query.criteria.JpaFrom.joinCollection.

Doc from jakarta.persistence.criteria.From.joinCollection.

Create a join to the specified Collection-valued attribute using the given join type.

Parameters
attributeName:String

name of the attribute for the target of the join

jt:JoinType

join type

Returns:SqmBagJoin<X, Y>

the resulting join

Annotations
@Override
joinListback to summary
public <X, Y> SqmListJoin<X, Y> joinList(String attributeName)

Redeclares org.hibernate.query.criteria.JpaFrom.joinList.

Doc from jakarta.persistence.criteria.From.joinList.

Create an inner join to the specified List-valued attribute.

Parameters
attributeName:String

name of the attribute for the target of the join

Returns:SqmListJoin<X, Y>

the resulting join

Annotations
@Override
joinListback to summary
public <X, Y> SqmListJoin<X, Y> joinList(String attributeName, JoinType jt)

Redeclares org.hibernate.query.criteria.JpaFrom.joinList.

Doc from jakarta.persistence.criteria.From.joinList.

Create a join to the specified List-valued attribute using the given join type.

Parameters
attributeName:String

name of the attribute for the target of the join

jt:JoinType

join type

Returns:SqmListJoin<X, Y>

the resulting join

Annotations
@Override
joinMapback to summary
public <X, K, V> SqmMapJoin<X, K, V> joinMap(String attributeName)

Redeclares org.hibernate.query.criteria.JpaFrom.joinMap.

Doc from jakarta.persistence.criteria.From.joinMap.

Create an inner join to the specified Map-valued attribute.

Parameters
attributeName:String

name of the attribute for the target of the join

Returns:SqmMapJoin<X, K, V>

the resulting join

Annotations
@Override
joinMapback to summary
public <X, K, V> SqmMapJoin<X, K, V> joinMap(String attributeName, JoinType jt)

Redeclares org.hibernate.query.criteria.JpaFrom.joinMap.

Doc from jakarta.persistence.criteria.From.joinMap.

Create a join to the specified Map-valued attribute using the given join type.

Parameters
attributeName:String

name of the attribute for the target of the join

jt:JoinType

join type

Returns:SqmMapJoin<X, K, V>

the resulting join

Annotations
@Override
joinSetback to summary
public <X, Y> SqmSetJoin<X, Y> joinSet(String attributeName)

Redeclares org.hibernate.query.criteria.JpaFrom.joinSet.

Doc from jakarta.persistence.criteria.From.joinSet.

Create an inner join to the specified Set-valued attribute.

Parameters
attributeName:String

name of the attribute for the target of the join

Returns:SqmSetJoin<X, Y>

the resulting join

Annotations
@Override
joinSetback to summary
public <X, Y> SqmSetJoin<X, Y> joinSet(String attributeName, JoinType jt)

Redeclares org.hibernate.query.criteria.JpaFrom.joinSet.

Doc from jakarta.persistence.criteria.From.joinSet.

Create a join to the specified Set-valued attribute using the given join type.

Parameters
attributeName:String

name of the attribute for the target of the join

jt:JoinType

join type

Returns:SqmSetJoin<X, Y>

the resulting join

Annotations
@Override
treatAsback to summary
public <S extends T> SqmFrom<?, S> treatAs(Class<S> treatAsType)

Redeclares org.hibernate.query.sqm.tree.domain.SqmPath.treatAs, org.hibernate.query.criteria.JpaPath.treatAs.

Doc from org.hibernate.query.criteria.JpaPath.treatAs.

Support for JPA's explicit (TREAT) down-casting.

Annotations
@Override
treatAsback to summary
public <S extends T> SqmFrom<?, S> treatAs(EntityDomainType<S> treatAsType)

Redeclares org.hibernate.query.sqm.tree.domain.SqmPath.treatAs, org.hibernate.query.criteria.JpaPath.treatAs.

Doc from org.hibernate.query.criteria.JpaPath.treatAs.

Support for JPA's explicit (TREAT) down-casting.

Annotations
@Override
treatAsback to summary
public <S extends T> SqmFrom<?, S> treatAs(Class<S> treatJavaType, String alias)
treatAsback to summary
public <S extends T> SqmFrom<?, S> treatAs(EntityDomainType<S> treatTarget, String alias)
visitSqmJoinsback to summary
public void visitSqmJoins(Consumer<SqmJoin<T, ?>> consumer)

Visit all associated joins