Class AbstractSqmFrom<O,T>
java.lang.Object
org.hibernate.query.sqm.tree.AbstractSqmNode
org.hibernate.query.sqm.tree.jpa.AbstractJpaTupleElement<T>
org.hibernate.query.sqm.tree.jpa.AbstractJpaSelection<T>
org.hibernate.query.sqm.tree.expression.AbstractSqmExpression<T>
org.hibernate.query.sqm.tree.domain.AbstractSqmPath<T>
org.hibernate.query.sqm.tree.domain.AbstractSqmFrom<O,T>
- All Implemented Interfaces:
Expression<T>
,FetchParent<O,
,T> From<O,
,T> Path<T>
,Selection<T>
,TupleElement<T>
,Serializable
,JpaCriteriaNode
,JpaExpression<T>
,JpaFetchParent<O,
,T> JpaFrom<O,
,T> JpaPath<T>
,JpaSelection<T>
,JpaTupleElement<T>
,SemanticPathPart
,SqmPath<T>
,SqmExpression<T>
,SqmFrom<O,
,T> SqmSelectableNode<T>
,SqmExpressibleAccessor<T>
,SqmNode
,SqmTypedNode<T>
,SqmVisitableNode
- Direct Known Subclasses:
AbstractSqmJoin
,SqmCrossJoin
,SqmRoot
Convenience base class for SqmFrom implementations
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractSqmFrom
(EntityDomainType<T> entityType, String alias, NodeBuilder nodeBuilder) Intended for use withSqmRoot
protected
AbstractSqmFrom
(NavigablePath navigablePath, SqmPathSource<T> entityType, String alias, NodeBuilder nodeBuilder) Intended for use withSqmTreatedRoot
toSqmRoot
protected
AbstractSqmFrom
(NavigablePath navigablePath, SqmPathSource<T> referencedNavigable, NodeBuilder nodeBuilder) Intended for use withSqmCorrelatedRootJoin
throughSqmRoot
protected
AbstractSqmFrom
(NavigablePath navigablePath, SqmPathSource<T> referencedNavigable, SqmFrom<?, ?> lhs, String alias, NodeBuilder nodeBuilder) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addSqmJoin
(SqmJoin<T, ?> join) Add an associated joinprotected <X extends SqmTreatedFrom<?,
?, ?>>
XaddTreat
(X treat) void
protected void
copyTo
(AbstractSqmFrom<O, T> target, SqmCopyContext context) abstract SqmCorrelation<O,
T> <X> JpaCrossJoin<X>
<X> JpaCrossJoin<X>
crossJoin
(EntityDomainType<X> entity) <A> SqmAttributeJoin<T,
A> fetch
(PluralAttribute<? super T, ?, A> attribute) <A> SqmAttributeJoin<T,
A> fetch
(PluralAttribute<? super T, ?, A> attribute, JoinType jt) <A> SqmSingularJoin<T,
A> fetch
(SingularAttribute<? super T, A> attribute) <A> SqmSingularJoin<T,
A> fetch
(SingularAttribute<? super T, A> attribute, JoinType jt) <X,
A> SqmAttributeJoin<X, A> <X,
A> SqmAttributeJoin<X, A> protected <S extends T,
X extends SqmTreatedFrom<O, T, S>>
XfindTreat
(ManagedDomainType<S> targetType, String alias) Retrieve the explicit alias, if one.getJoins()
JpaPath<?>
The joins associated with this SqmFromList<SqmTreatedFrom<?,
?, ?>> The treats associated with this SqmFromboolean
boolean
hasJoins()
boolean
<X> JpaDerivedJoin<X>
<X> JpaDerivedJoin<X>
join
(Subquery<X> subquery, SqmJoinType joinType) <X> JpaDerivedJoin<X>
join
(Subquery<X> subquery, SqmJoinType joinType, boolean lateral) <X> JpaDerivedJoin<X>
join
(Subquery<X> subquery, SqmJoinType joinType, boolean lateral, String alias) <A> SqmBagJoin<T,
A> join
(CollectionAttribute<? super T, A> attribute) <E> SqmBagJoin<T,
E> join
(CollectionAttribute<? super T, E> attribute, JoinType jt) <R> SqmEntityJoin<T,
R> join
(EntityType<R> entityType) <Y> SqmEntityJoin<T,
Y> join
(EntityType<Y> entity, JoinType joinType) <E> SqmListJoin<T,
E> join
(ListAttribute<? super T, E> attribute) <E> SqmListJoin<T,
E> join
(ListAttribute<? super T, E> attribute, JoinType jt) <K,
V> SqmMapJoin<T, K, V> join
(MapAttribute<? super T, K, V> attribute) <K,
V> SqmMapJoin<T, K, V> join
(MapAttribute<? super T, K, V> attribute, JoinType jt) <E> SqmSetJoin<T,
E> join
(SetAttribute<? super T, E> attribute) <E> SqmSetJoin<T,
E> join
(SetAttribute<? super T, E> attribute, JoinType jt) <A> SqmSingularJoin<T,
A> join
(SingularAttribute<? super T, A> attribute) <A> SqmSingularJoin<T,
A> join
(SingularAttribute<? super T, A> attribute, JoinType jt) <R> SqmEntityJoin<T,
R> <X> SqmEntityJoin<T,
X> join
(Class<X> targetEntityClass, SqmJoinType joinType) <Y> SqmEntityJoin<T,
Y> <X,
Y> SqmAttributeJoin<X, Y> <X,
Y> SqmAttributeJoin<X, Y> <X> SqmEntityJoin<T,
X> join
(EntityDomainType<X> targetEntityDescriptor) <X> SqmEntityJoin<T,
X> join
(EntityDomainType<X> targetEntityDescriptor, SqmJoinType joinType) <X> SqmJoin<?,
X> join
(JpaCteCriteria<X> cte) <X> SqmJoin<?,
X> join
(JpaCteCriteria<X> cte, SqmJoinType joinType) <X> SqmJoin<?,
X> join
(JpaCteCriteria<X> cte, SqmJoinType joinType, String alias) <X> JpaFunctionJoin<X>
join
(JpaSetReturningFunction<X> function) Like calling the overloadJpaFrom.join(JpaSetReturningFunction, SqmJoinType)
withSqmJoinType.INNER
.<X> JpaFunctionJoin<X>
join
(JpaSetReturningFunction<X> function, SqmJoinType joinType) Like calling the overloadJpaFrom.join(JpaSetReturningFunction, SqmJoinType, boolean)
passingfalse
for thelateral
parameter.<X> JpaFunctionJoin<X>
join
(JpaSetReturningFunction<X> function, SqmJoinType joinType, boolean lateral) Creates and returns a join node for the given set returning function.<X> JpaFunctionJoin<X>
joinArray
(SingularAttribute<? super T, X[]> arrayAttribute) Like calling the overloadJpaFrom.joinArray(SingularAttribute, SqmJoinType)
withSqmJoinType.INNER
.<X> JpaFunctionJoin<X>
joinArray
(SingularAttribute<? super T, X[]> arrayAttribute, SqmJoinType joinType) Like calling the overloadJpaFrom.join(JpaSetReturningFunction, SqmJoinType)
withHibernateCriteriaBuilder.unnestArray(Expression)
with the given attribute.<X> JpaFunctionJoin<X>
Like calling the overloadJpaFrom.joinArray(String, SqmJoinType)
withSqmJoinType.INNER
.<X> JpaFunctionJoin<X>
joinArray
(String arrayAttributeName, SqmJoinType joinType) Like calling the overloadJpaFrom.join(JpaSetReturningFunction, SqmJoinType)
withHibernateCriteriaBuilder.unnestArray(Expression)
with the result ofJpaPath.get(String)
passing the given attribute name.<X> JpaFunctionJoin<X>
joinArrayCollection
(SingularAttribute<? super T, ? extends Collection<X>> collectionAttribute) Like calling the overloadJpaFrom.joinArrayCollection(SingularAttribute, SqmJoinType)
withSqmJoinType.INNER
.<X> JpaFunctionJoin<X>
joinArrayCollection
(SingularAttribute<? super T, ? extends Collection<X>> collectionAttribute, SqmJoinType joinType) Like calling the overloadJpaFrom.join(JpaSetReturningFunction, SqmJoinType)
withHibernateCriteriaBuilder.unnestCollection(Expression)
with the given attribute.<X> JpaFunctionJoin<X>
joinArrayCollection
(String collectionAttributeName) Like calling the overloadJpaFrom.joinArrayCollection(String, SqmJoinType)
withSqmJoinType.INNER
.<X> JpaFunctionJoin<X>
joinArrayCollection
(String collectionAttributeName, SqmJoinType joinType) Like calling the overloadJpaFrom.join(JpaSetReturningFunction, SqmJoinType)
withHibernateCriteriaBuilder.unnestCollection(Expression)
with the result ofJpaPath.get(String)
passing the given attribute name.<X,
Y> SqmBagJoin<X, Y> joinCollection
(String attributeName) <X,
Y> SqmBagJoin<X, Y> joinCollection
(String attributeName, JoinType jt) <X> JpaDerivedJoin<X>
joinLateral
(Subquery<X> subquery) <X> JpaDerivedJoin<X>
joinLateral
(Subquery<X> subquery, SqmJoinType joinType) <X> JpaFunctionJoin<X>
joinLateral
(JpaSetReturningFunction<X> function) Like calling the overloadJpaFrom.joinLateral(JpaSetReturningFunction, SqmJoinType)
withSqmJoinType.INNER
.<X> JpaFunctionJoin<X>
joinLateral
(JpaSetReturningFunction<X> function, SqmJoinType joinType) Like calling the overloadJpaFrom.join(JpaSetReturningFunction, SqmJoinType, boolean)
passingtrue
for thelateral
parameter.<X,
Y> SqmListJoin<X, Y> <X,
Y> SqmListJoin<X, Y> <X,
K, V> SqmMapJoin<X, K, V> <X,
K, V> SqmMapJoin<X, K, V> <X,
Y> SqmSetJoin<X, Y> <X,
Y> SqmSetJoin<X, Y> void
SqmPath<?>
resolvePathPart
(String name, boolean isTerminal, SqmCreationState creationState) void
setExplicitAlias
(String explicitAlias) Set the explicit alias for this path<S extends T>
SqmTreatedFrom<O,T, S> Support for JPA's explicit (TREAT) down-casting.<S extends T>
SqmTreatedFrom<O,T, S> <S extends T>
SqmTreatedFrom<O,T, S> <S extends T>
SqmTreatedFrom<O,T, S> treatAs
(EntityDomainType<S> treatTarget) Support for JPA's explicit (TREAT) down-casting.<S extends T>
SqmTreatedFrom<O,T, S> treatAs
(EntityDomainType<S> treatTarget, String alias) <S extends T>
SqmTreatedFrom<O,T, S> treatAs
(EntityDomainType<S> treatTarget, String alias, boolean fetch) void
visitSqmJoins
(Consumer<SqmJoin<T, ?>> consumer) Visit all associated joinsMethods inherited from class org.hibernate.query.sqm.tree.domain.AbstractSqmPath
copyTo, get, get, get, get, get, getExpressible, getLhs, getModel, getNavigablePath, getNavigablePathCopy, getNodeType, getReferencedPathSource, getResolvedModel, getReusablePath, getReusablePaths, getTreatedPath, registerReusablePath, resolvePath, resolvePath, toString, type, visitReusablePaths
Methods inherited from class org.hibernate.query.sqm.tree.expression.AbstractSqmExpression
applyInferableType, as, asBigDecimal, asBigInteger, asDouble, asFloat, asInteger, asLong, asString, cast, equalTo, equalTo, getJavaTypeDescriptor, in, in, in, in, internalApplyInferableType, isNotNull, isNull, nodeBuilder, notEqualTo, notEqualTo
Methods inherited from class org.hibernate.query.sqm.tree.jpa.AbstractJpaSelection
getSelectionItems, isCompoundSelection
Methods inherited from class org.hibernate.query.sqm.tree.jpa.AbstractJpaTupleElement
copyTo, getAlias, setAlias, setExpressibleType
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.hibernate.query.criteria.JpaFrom
join, join, join, join, join, joinLateral
Methods inherited from interface org.hibernate.query.criteria.JpaSelection
getCompoundSelectionItems, getSelectionItems
Methods inherited from interface org.hibernate.query.criteria.JpaTupleElement
getJavaType, getJavaTypeName, isEnum
Methods inherited from interface jakarta.persistence.criteria.Selection
isCompoundSelection
Methods inherited from interface org.hibernate.query.sqm.tree.expression.SqmExpression
as, asBigDecimal, asBigInteger, asDouble, asFloat, asInteger, asLong, asString, cast, castAs, equalTo, equalTo, in, in, in, in, isNotNull, isNull, notEqualTo, notEqualTo, visitSubSelectableNodes
Methods inherited from interface org.hibernate.query.sqm.tree.from.SqmFrom
copy, getReferencedPathSource, hasTreats
Methods inherited from interface org.hibernate.query.sqm.tree.SqmNode
asLoggableText, nodeBuilder
Methods inherited from interface org.hibernate.query.sqm.tree.domain.SqmPath
applyInferableType, findRoot, get, get, get, get, get, getJavaTypeDescriptor, getLhs, getNavigablePath, getNodeType, getResolvedModel, getReusablePath, getReusablePaths, registerReusablePath, resolveAlias, resolveIndexedAccess, type, visitReusablePaths
Methods inherited from interface org.hibernate.query.sqm.tree.select.SqmSelectableNode
getTupleLength
Methods inherited from interface org.hibernate.query.sqm.tree.SqmTypedNode
getExpressible, getNodeJavaType
Methods inherited from interface org.hibernate.query.sqm.tree.SqmVisitableNode
accept, toHqlString
Methods inherited from interface jakarta.persistence.TupleElement
getAlias
-
Constructor Details
-
AbstractSqmFrom
Intended for use withSqmRoot
-
Method Details
-
copyTo
-
getExplicitAlias
Description copied from interface:SqmPath
Retrieve the explicit alias, if one. May return null- Specified by:
getExplicitAlias
in interfaceSqmPath<O>
- Overrides:
getExplicitAlias
in classAbstractSqmPath<T>
-
setExplicitAlias
Description copied from interface:SqmPath
Set the explicit alias for this path- Specified by:
setExplicitAlias
in interfaceSqmPath<O>
- Overrides:
setExplicitAlias
in classAbstractSqmPath<T>
-
resolvePathPart
- Specified by:
resolvePathPart
in interfaceSemanticPathPart
- Specified by:
resolvePathPart
in interfaceSqmPath<O>
-
hasJoins
public boolean hasJoins() -
getSqmJoins
Description copied from interface:SqmFrom
The joins associated with this SqmFrom- Specified by:
getSqmJoins
in interfaceSqmFrom<O,
T>
-
addSqmJoin
Description copied from interface:SqmFrom
Add an associated join- Specified by:
addSqmJoin
in interfaceSqmFrom<O,
T>
-
removeLeftFetchJoins
-
visitSqmJoins
Description copied from interface:SqmFrom
Visit all associated joins- Specified by:
visitSqmJoins
in interfaceSqmFrom<O,
T>
-
getSqmTreats
Description copied from interface:SqmFrom
The treats associated with this SqmFrom- Specified by:
getSqmTreats
in interfaceSqmFrom<O,
T>
-
findTreat
protected <S extends T,X extends SqmTreatedFrom<O, X findTreatT, S>> (ManagedDomainType<S> targetType, String alias) -
addTreat
-
getParentPath
- Specified by:
getParentPath
in interfaceJpaPath<O>
- Specified by:
getParentPath
in interfacePath<O>
-
getCorrelationParent
- Specified by:
getCorrelationParent
in interfaceFrom<O,
T> - Specified by:
getCorrelationParent
in interfaceJpaFrom<O,
T> - Specified by:
getCorrelationParent
in interfaceSqmFrom<O,
T>
-
createCorrelation
-
getJoins
-
hasImplicitlySelectableJoin
public boolean hasImplicitlySelectableJoin()- Specified by:
hasImplicitlySelectableJoin
in interfaceSqmFrom<O,
T>
-
join
-
join
-
join
-
join
-
join
public <X> SqmEntityJoin<T,X> join(EntityDomainType<X> targetEntityDescriptor, SqmJoinType joinType) -
join
-
join
-
join
-
join
-
join
-
join
-
join
-
join
-
join
-
join
-
joinCollection
- Specified by:
joinCollection
in interfaceFrom<O,
T> - Specified by:
joinCollection
in interfaceJpaFrom<O,
T> - Specified by:
joinCollection
in interfaceSqmFrom<O,
T>
-
joinCollection
- Specified by:
joinCollection
in interfaceFrom<O,
T> - Specified by:
joinCollection
in interfaceJpaFrom<O,
T> - Specified by:
joinCollection
in interfaceSqmFrom<O,
T>
-
joinSet
-
joinSet
-
joinList
-
joinList
-
joinMap
-
joinMap
-
join
-
join
-
join
-
join
-
join
-
join
-
joinLateral
- Specified by:
joinLateral
in interfaceJpaFrom<O,
T>
-
joinLateral
- Specified by:
joinLateral
in interfaceJpaFrom<O,
T>
-
join
-
join
public <X> JpaDerivedJoin<X> join(Subquery<X> subquery, SqmJoinType joinType, boolean lateral, String alias) -
join
-
join
-
join
-
joinLateral
public <X> JpaFunctionJoin<X> joinLateral(JpaSetReturningFunction<X> function, SqmJoinType joinType) Description copied from interface:JpaFrom
Like calling the overloadJpaFrom.join(JpaSetReturningFunction, SqmJoinType, boolean)
passingtrue
for thelateral
parameter.- Specified by:
joinLateral
in interfaceJpaFrom<O,
T> - See Also:
-
joinLateral
Description copied from interface:JpaFrom
Like calling the overloadJpaFrom.joinLateral(JpaSetReturningFunction, SqmJoinType)
withSqmJoinType.INNER
.- Specified by:
joinLateral
in interfaceJpaFrom<O,
T> - See Also:
-
join
Description copied from interface:JpaFrom
Like calling the overloadJpaFrom.join(JpaSetReturningFunction, SqmJoinType, boolean)
passingfalse
for thelateral
parameter. -
join
Description copied from interface:JpaFrom
Like calling the overloadJpaFrom.join(JpaSetReturningFunction, SqmJoinType)
withSqmJoinType.INNER
. -
join
public <X> JpaFunctionJoin<X> join(JpaSetReturningFunction<X> function, SqmJoinType joinType, boolean lateral) Description copied from interface:JpaFrom
Creates and returns a join node for the given set returning function. If function arguments refer to correlated paths, thelateral
argument must be set totrue
. Failing to do so when necessary may lead to an error during query compilation or execution. -
joinArray
Description copied from interface:JpaFrom
Like calling the overloadJpaFrom.joinArray(String, SqmJoinType)
withSqmJoinType.INNER
. -
joinArray
Description copied from interface:JpaFrom
Like calling the overloadJpaFrom.join(JpaSetReturningFunction, SqmJoinType)
withHibernateCriteriaBuilder.unnestArray(Expression)
with the result ofJpaPath.get(String)
passing the given attribute name. -
joinArray
Description copied from interface:JpaFrom
Like calling the overloadJpaFrom.joinArray(SingularAttribute, SqmJoinType)
withSqmJoinType.INNER
. -
joinArray
public <X> JpaFunctionJoin<X> joinArray(SingularAttribute<? super T, X[]> arrayAttribute, SqmJoinType joinType) Description copied from interface:JpaFrom
Like calling the overloadJpaFrom.join(JpaSetReturningFunction, SqmJoinType)
withHibernateCriteriaBuilder.unnestArray(Expression)
with the given attribute. -
joinArrayCollection
Description copied from interface:JpaFrom
Like calling the overloadJpaFrom.joinArrayCollection(String, SqmJoinType)
withSqmJoinType.INNER
.- Specified by:
joinArrayCollection
in interfaceJpaFrom<O,
T> - See Also:
-
joinArrayCollection
public <X> JpaFunctionJoin<X> joinArrayCollection(String collectionAttributeName, SqmJoinType joinType) Description copied from interface:JpaFrom
Like calling the overloadJpaFrom.join(JpaSetReturningFunction, SqmJoinType)
withHibernateCriteriaBuilder.unnestCollection(Expression)
with the result ofJpaPath.get(String)
passing the given attribute name.- Specified by:
joinArrayCollection
in interfaceJpaFrom<O,
T> - See Also:
-
joinArrayCollection
public <X> JpaFunctionJoin<X> joinArrayCollection(SingularAttribute<? super T, ? extends Collection<X>> collectionAttribute) Description copied from interface:JpaFrom
Like calling the overloadJpaFrom.joinArrayCollection(SingularAttribute, SqmJoinType)
withSqmJoinType.INNER
.- Specified by:
joinArrayCollection
in interfaceJpaFrom<O,
T> - See Also:
-
joinArrayCollection
public <X> JpaFunctionJoin<X> joinArrayCollection(SingularAttribute<? super T, ? extends Collection<X>> collectionAttribute, SqmJoinType joinType) Description copied from interface:JpaFrom
Like calling the overloadJpaFrom.join(JpaSetReturningFunction, SqmJoinType)
withHibernateCriteriaBuilder.unnestCollection(Expression)
with the given attribute.- Specified by:
joinArrayCollection
in interfaceJpaFrom<O,
T> - See Also:
-
crossJoin
-
crossJoin
-
getFetches
- Specified by:
getFetches
in interfaceFetchParent<O,
T> - Specified by:
getFetches
in interfaceJpaFetchParent<O,
T>
-
fetch
- Specified by:
fetch
in interfaceFetchParent<O,
T> - Specified by:
fetch
in interfaceJpaFetchParent<O,
T>
-
fetch
- Specified by:
fetch
in interfaceFetchParent<O,
T> - Specified by:
fetch
in interfaceJpaFetchParent<O,
T>
-
fetch
- Specified by:
fetch
in interfaceFetchParent<O,
T> - Specified by:
fetch
in interfaceJpaFetchParent<O,
T>
-
fetch
- Specified by:
fetch
in interfaceFetchParent<O,
T> - Specified by:
fetch
in interfaceJpaFetchParent<O,
T>
-
fetch
- Specified by:
fetch
in interfaceFetchParent<O,
T> - Specified by:
fetch
in interfaceJpaFetchParent<O,
T>
-
fetch
- Specified by:
fetch
in interfaceFetchParent<O,
T> - Specified by:
fetch
in interfaceJpaFetchParent<O,
T>
-
treatAs
Description copied from interface:JpaPath
Support for JPA's explicit (TREAT) down-casting. -
treatAs
Description copied from interface:JpaPath
Support for JPA's explicit (TREAT) down-casting. -
treatAs
-
treatAs
-
treatAs
-
treatAs
public <S extends T> SqmTreatedFrom<O,T, treatAsS> (EntityDomainType<S> treatTarget, String alias, boolean fetch) -
appendHqlString
- Specified by:
appendHqlString
in interfaceSqmVisitableNode
-
alias
- Specified by:
alias
in interfaceJpaSelection<O>
- Specified by:
alias
in interfaceSelection<O>
- Overrides:
alias
in classAbstractJpaSelection<T>
-