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
ConstructorsModifierConstructorDescriptionprotectedAbstractSqmFrom(EntityDomainType<T> entityType, String alias, NodeBuilder nodeBuilder) Intended for use withSqmRootprotectedAbstractSqmFrom(NavigablePath navigablePath, SqmPathSource<T> entityType, String alias, NodeBuilder nodeBuilder) Intended for use withSqmTreatedRoottoSqmRootprotectedAbstractSqmFrom(NavigablePath navigablePath, SqmPathSource<T> referencedNavigable, NodeBuilder nodeBuilder) Intended for use withSqmCorrelatedRootJointhroughSqmRootprotectedAbstractSqmFrom(NavigablePath navigablePath, SqmPathSource<T> referencedNavigable, SqmFrom<?, ?> lhs, String alias, NodeBuilder nodeBuilder) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddSqmJoin(SqmJoin<T, ?> join) Add an associated joinprotected <X extends SqmTreatedFrom<?,?, ?>>
XaddTreat(X treat) voidappendHqlString(StringBuilder hql, SqmRenderContext context) protected voidcopyTo(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()intJpaPath<?> The joins associated with this SqmFromList<SqmTreatedFrom<?, ?, ?>> The treats associated with this SqmFrombooleanbooleanhasJoins()id()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)passingfalsefor thelateralparameter.<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)passingtruefor thelateralparameter.<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> voidSqmPath<?> resolvePathPart(String name, boolean isTerminal, SqmCreationState creationState) voidsetExplicitAlias(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) voidvisitSqmJoins(Consumer<SqmJoin<T, ?>> consumer) Visit all associated joinsMethods inherited from class org.hibernate.query.sqm.tree.domain.AbstractSqmPath
copyTo, equals, get, get, get, get, get, getExpressible, getLhs, getModel, getNavigablePath, getNavigablePathCopy, getNodeType, getReferencedPathSource, getResolvedModel, getReusablePath, getReusablePaths, getTreatedPath, hashCode, registerReusablePath, resolvePath, resolvePath, toString, type, visitReusablePathsMethods 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, notEqualToMethods inherited from class org.hibernate.query.sqm.tree.jpa.AbstractJpaSelection
getSelectionItems, isCompoundSelectionMethods inherited from class org.hibernate.query.sqm.tree.jpa.AbstractJpaTupleElement
copyTo, getAlias, setAlias, setExpressibleTypeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.hibernate.query.criteria.JpaFrom
join, join, join, join, join, joinLateralMethods inherited from interface org.hibernate.query.criteria.JpaSelection
getCompoundSelectionItems, getSelectionItemsMethods inherited from interface org.hibernate.query.criteria.JpaTupleElement
getJavaType, getJavaTypeName, isEnumMethods inherited from interface jakarta.persistence.criteria.Selection
isCompoundSelectionMethods 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, visitSubSelectableNodesMethods inherited from interface org.hibernate.query.sqm.tree.from.SqmFrom
copy, getReferencedPathSource, hasTreats, resolveAliasMethods inherited from interface org.hibernate.query.sqm.tree.SqmNode
asLoggableText, nodeBuilderMethods 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, resolveIndexedAccess, type, visitReusablePathsMethods inherited from interface org.hibernate.query.sqm.tree.select.SqmSelectableNode
getTupleLengthMethods inherited from interface org.hibernate.query.sqm.tree.SqmTypedNode
getExpressible, getNodeJavaTypeMethods inherited from interface org.hibernate.query.sqm.tree.SqmVisitableNode
accept, toHqlStringMethods inherited from interface jakarta.persistence.TupleElement
getAlias
-
Constructor Details
-
AbstractSqmFrom
Intended for use withSqmRoot
-
Method Details
-
copyTo
-
getExplicitAlias
Description copied from interface:SqmPathRetrieve the explicit alias, if one. May return null- Specified by:
getExplicitAliasin interfaceSqmPath<O>- Overrides:
getExplicitAliasin classAbstractSqmPath<T>
-
setExplicitAlias
Description copied from interface:SqmPathSet the explicit alias for this path- Specified by:
setExplicitAliasin interfaceSqmPath<O>- Overrides:
setExplicitAliasin classAbstractSqmPath<T>
-
resolvePathPart
- Specified by:
resolvePathPartin interfaceSemanticPathPart- Specified by:
resolvePathPartin interfaceSqmPath<O>
-
hasJoins
public boolean hasJoins() -
getSqmJoins
Description copied from interface:SqmFromThe joins associated with this SqmFrom- Specified by:
getSqmJoinsin interfaceSqmFrom<O,T>
-
getNumberOfJoins
public int getNumberOfJoins()- Specified by:
getNumberOfJoinsin interfaceSqmFrom<O,T>
-
addSqmJoin
Description copied from interface:SqmFromAdd an associated join- Specified by:
addSqmJoinin interfaceSqmFrom<O,T>
-
removeLeftFetchJoins
-
visitSqmJoins
Description copied from interface:SqmFromVisit all associated joins- Specified by:
visitSqmJoinsin interfaceSqmFrom<O,T>
-
getSqmTreats
Description copied from interface:SqmFromThe treats associated with this SqmFrom- Specified by:
getSqmTreatsin interfaceSqmFrom<O,T>
-
findTreat
protected <S extends T,X extends SqmTreatedFrom<O, X findTreatT, S>> (ManagedDomainType<S> targetType, String alias) -
addTreat
-
getParentPath
- Specified by:
getParentPathin interfaceJpaPath<O>- Specified by:
getParentPathin interfacePath<O>
-
getCorrelationParent
- Specified by:
getCorrelationParentin interfaceFrom<O,T> - Specified by:
getCorrelationParentin interfaceJpaFrom<O,T> - Specified by:
getCorrelationParentin interfaceSqmFrom<O,T>
-
createCorrelation
-
getJoins
-
hasImplicitlySelectableJoin
public boolean hasImplicitlySelectableJoin()- Specified by:
hasImplicitlySelectableJoinin 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:
joinCollectionin interfaceFrom<O,T> - Specified by:
joinCollectionin interfaceJpaFrom<O,T> - Specified by:
joinCollectionin interfaceSqmFrom<O,T>
-
joinCollection
- Specified by:
joinCollectionin interfaceFrom<O,T> - Specified by:
joinCollectionin interfaceJpaFrom<O,T> - Specified by:
joinCollectionin interfaceSqmFrom<O,T>
-
joinSet
-
joinSet
-
joinList
-
joinList
-
joinMap
-
joinMap
-
join
-
join
-
join
-
join
-
join
-
join
-
joinLateral
- Specified by:
joinLateralin interfaceJpaFrom<O,T>
-
joinLateral
- Specified by:
joinLateralin 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:JpaFromLike calling the overloadJpaFrom.join(JpaSetReturningFunction, SqmJoinType, boolean)passingtruefor thelateralparameter.- Specified by:
joinLateralin interfaceJpaFrom<O,T> - See Also:
-
joinLateral
Description copied from interface:JpaFromLike calling the overloadJpaFrom.joinLateral(JpaSetReturningFunction, SqmJoinType)withSqmJoinType.INNER.- Specified by:
joinLateralin interfaceJpaFrom<O,T> - See Also:
-
join
Description copied from interface:JpaFromLike calling the overloadJpaFrom.join(JpaSetReturningFunction, SqmJoinType, boolean)passingfalsefor thelateralparameter. -
join
Description copied from interface:JpaFromLike 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:JpaFromCreates and returns a join node for the given set returning function. If function arguments refer to correlated paths, thelateralargument 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:JpaFromLike calling the overloadJpaFrom.joinArray(String, SqmJoinType)withSqmJoinType.INNER. -
joinArray
Description copied from interface:JpaFromLike 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:JpaFromLike 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:JpaFromLike calling the overloadJpaFrom.join(JpaSetReturningFunction, SqmJoinType)withHibernateCriteriaBuilder.unnestArray(Expression)with the given attribute. -
joinArrayCollection
Description copied from interface:JpaFromLike calling the overloadJpaFrom.joinArrayCollection(String, SqmJoinType)withSqmJoinType.INNER.- Specified by:
joinArrayCollectionin interfaceJpaFrom<O,T> - See Also:
-
joinArrayCollection
public <X> JpaFunctionJoin<X> joinArrayCollection(String collectionAttributeName, SqmJoinType joinType) Description copied from interface:JpaFromLike calling the overloadJpaFrom.join(JpaSetReturningFunction, SqmJoinType)withHibernateCriteriaBuilder.unnestCollection(Expression)with the result ofJpaPath.get(String)passing the given attribute name.- Specified by:
joinArrayCollectionin interfaceJpaFrom<O,T> - See Also:
-
joinArrayCollection
public <X> JpaFunctionJoin<X> joinArrayCollection(SingularAttribute<? super T, ? extends Collection<X>> collectionAttribute) Description copied from interface:JpaFromLike calling the overloadJpaFrom.joinArrayCollection(SingularAttribute, SqmJoinType)withSqmJoinType.INNER.- Specified by:
joinArrayCollectionin interfaceJpaFrom<O,T> - See Also:
-
joinArrayCollection
public <X> JpaFunctionJoin<X> joinArrayCollection(SingularAttribute<? super T, ? extends Collection<X>> collectionAttribute, SqmJoinType joinType) Description copied from interface:JpaFromLike calling the overloadJpaFrom.join(JpaSetReturningFunction, SqmJoinType)withHibernateCriteriaBuilder.unnestCollection(Expression)with the given attribute.- Specified by:
joinArrayCollectionin interfaceJpaFrom<O,T> - See Also:
-
crossJoin
-
crossJoin
-
getFetches
- Specified by:
getFetchesin interfaceFetchParent<O,T> - Specified by:
getFetchesin interfaceJpaFetchParent<O,T>
-
fetch
- Specified by:
fetchin interfaceFetchParent<O,T> - Specified by:
fetchin interfaceJpaFetchParent<O,T>
-
fetch
- Specified by:
fetchin interfaceFetchParent<O,T> - Specified by:
fetchin interfaceJpaFetchParent<O,T>
-
fetch
- Specified by:
fetchin interfaceFetchParent<O,T> - Specified by:
fetchin interfaceJpaFetchParent<O,T>
-
fetch
- Specified by:
fetchin interfaceFetchParent<O,T> - Specified by:
fetchin interfaceJpaFetchParent<O,T>
-
fetch
- Specified by:
fetchin interfaceFetchParent<O,T> - Specified by:
fetchin interfaceJpaFetchParent<O,T>
-
fetch
- Specified by:
fetchin interfaceFetchParent<O,T> - Specified by:
fetchin interfaceJpaFetchParent<O,T>
-
treatAs
Description copied from interface:JpaPathSupport for JPA's explicit (TREAT) down-casting. -
treatAs
Description copied from interface:JpaPathSupport 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:
appendHqlStringin interfaceSqmVisitableNode
-
alias
- Specified by:
aliasin interfaceJpaSelection<O>- Specified by:
aliasin interfaceSelection<O>- Overrides:
aliasin classAbstractJpaSelection<T>
-
id
-