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>, SqmCacheable, 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 <S extends T, X extends SqmTreatedFrom<O,T, S>>
XaddTreat(X treat) voidappendHqlString(StringBuilder hql, SqmRenderContext context) protected voidcopyTo(AbstractSqmFrom<O, T> target, SqmCopyContext context) abstract SqmCorrelation<O, T> <X> JpaCrossJoin<T, X> <X> JpaCrossJoin<T, X> crossJoin(EntityDomainType<X> entity) booleandeepEquals(SqmFrom<?, ?> object) <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) <A> SqmAttributeJoin<T, A> <A> SqmAttributeJoin<T, A> protected <S extends T>
SqmTreatedFrom<O, T, S> findTreat(ManagedDomainType<S> targetType, String alias) Retrieve the explicit alias, if one.getJoins()intJpaPath<?> The joins associated with this SqmFromList<SqmTreatedFrom<O, T, ?>> The treats associated with this SqmFrombooleanbooleanhasJoins()id()booleanbooleanisDeepCompatible(SqmFrom<?, ?> object) <X> JpaDerivedJoin<X> <X> JpaDerivedJoin<X> <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> JpaEntityJoin<T, X> <X> SqmEntityJoin<T, X> join(Class<X> targetEntityClass, SqmJoinType joinType) <Y> SqmEntityJoin<T, Y> <Y> SqmAttributeJoin<T, Y> <Y> SqmAttributeJoin<T, Y> <X> SqmEntityJoin<T, X> join(EntityDomainType<X> targetEntityDescriptor) <X> JpaEntityJoin<T, X> join(EntityDomainType<X> entity, JoinType joinType) <X> SqmJoin<?, X> join(JpaCteCriteria<X> cte) <X> JpaJoin<?, X> join(JpaCteCriteria<X> cte, JoinType joinType) <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.<Y> SqmBagJoin<T, Y> joinCollection(String attributeName) <Y> SqmBagJoin<T, Y> joinCollection(String attributeName, JoinType jt) <X> JpaDerivedJoin<X> joinLateral(Subquery<X> subquery) <X> JpaDerivedJoin<X> joinLateral(Subquery<X> subquery, JoinType joinType) <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.<Y> SqmListJoin<T, Y> <Y> SqmListJoin<T, Y> <K,V> SqmMapJoin <T, K, V> <K,V> SqmMapJoin <T, K, V> <Y> SqmSetJoin<T, Y> <Y> SqmSetJoin<T, 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) voidvisitSqmJoins(Consumer<SqmJoin<T, ?>> consumer) Visit all associated joinsMethods inherited from class AbstractSqmPath
cacheHashCode, copyTo, equals, get, get, get, get, get, get, get, get, get, get, getExpressible, getJavaTypeDescriptor, getLhs, getModel, getNavigablePath, getNavigablePathCopy, getNodeJavaType, getNodeType, getReferencedPathSource, getResolvedModel, getReusablePath, getReusablePaths, getTreatedPath, hashCode, isCompatible, registerReusablePath, resolvePath, resolvePath, toString, treatAs, type, visitReusablePathsMethods inherited from class AbstractSqmExpression
applyInferableType, as, cast, coalesce, coalesce, count, countDistinct, equalTo, equalTo, in, in, in, in, in, internalApplyInferableType, isMember, isNotMember, isNotNull, isNull, nodeBuilder, notEqualTo, notEqualTo, nullif, nullif, selectCase, selectCaseMethods inherited from class AbstractJpaSelection
getSelectionItems, isCompoundSelectionMethods inherited from class AbstractJpaTupleElement
copyTo, getAlias, setAlias, setExpressibleTypeMethods inherited from interface JpaExpression
coalesce, coalesce, count, countDistinct, in, isMember, isNotMember, nullif, nullif, selectCase, selectCaseMethods inherited from interface JpaSelection
getCompoundSelectionItems, getSelectionItemsMethods inherited from interface JpaTupleElement
getJavaType, getJavaTypeName, isEnumMethods inherited from interface Selection
isCompoundSelectionMethods inherited from interface SqmCacheable
cacheHashCode, isCompatibleMethods inherited from interface 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 SqmFrom
copy, getReferencedPathSource, hasTreats, resolveAliasMethods inherited from interface SqmNode
asLoggableText, nodeBuilderMethods inherited from interface SqmPath
applyInferableType, findRoot, get, get, get, get, get, getJavaTypeDescriptor, getLhs, getNavigablePath, getNodeType, getResolvedModel, getReusablePath, getReusablePaths, registerReusablePath, resolveIndexedAccess, treatAs, type, visitReusablePathsMethods inherited from interface SqmSelectableNode
getTupleLengthMethods inherited from interface SqmTypedNode
getExpressible, getNodeJavaTypeMethods inherited from interface SqmVisitableNode
accept, toHqlStringMethods inherited from interface TupleElement
getAlias
-
Constructor Details
-
AbstractSqmFrom
protected AbstractSqmFrom(EntityDomainType<T> entityType, @Nullable String alias, NodeBuilder nodeBuilder) 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>
-
getJoinList
-
hasJoins
-
getSqmJoins
-
getNumberOfJoins
public int getNumberOfJoins()- Specified by:
getNumberOfJoinsin interfaceSqmFrom<O,T>
-
addSqmJoin
-
removeLeftFetchJoins
-
visitSqmJoins
-
getSqmTreats
Description copied from interface:SqmFromThe treats associated with this SqmFrom- Specified by:
getSqmTreatsin interfaceSqmFrom<O,T>
-
findTreat
@Nullable protected <S extends T> SqmTreatedFrom<O,T, findTreatS> (ManagedDomainType<S> targetType, @Nullable String alias) -
addTreat
-
getParentPath
- Specified by:
getParentPathin interfaceJpaPath<O>- Specified by:
getParentPathin interfacePath<O>
-
getCorrelationParent
-
createCorrelation
-
getJoins
-
hasImplicitlySelectableJoin
public boolean hasImplicitlySelectableJoin()- Specified by:
hasImplicitlySelectableJoinin interfaceSqmFrom<O,T>
-
join
-
join
-
join
@Nonnull public <X> SqmEntityJoin<T,X> join(@Nonnull Class<X> targetEntityClass, @Nonnull SqmJoinType joinType) -
join
-
join
-
join
-
join
-
join
-
join
-
join
-
join
-
join
-
join
-
join
-
join
-
join
-
join
-
joinLateral
@Nonnull public <X> JpaDerivedJoin<X> joinLateral(@Nonnull Subquery<X> subquery, @Nonnull JoinType joinType) - Specified by:
joinLateralin interfaceJpaFrom<O,T>
-
join
-
join
-
joinCollection
- Specified by:
joinCollectionin interfaceFrom<O,T> - Specified by:
joinCollectionin interfaceJpaFrom<O,T> - Specified by:
joinCollectionin interfaceSqmFrom<O,T>
-
joinCollection
@Nonnull public <Y> SqmBagJoin<T,Y> joinCollection(@Nonnull String attributeName, @Nonnull JoinType jt) - 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
@Nonnull public <X> JpaDerivedJoin<X> join(@Nonnull Subquery<X> subquery, @Nonnull SqmJoinType joinType) -
joinLateral
- Specified by:
joinLateralin interfaceJpaFrom<O,T>
-
joinLateral
@Nonnull public <X> JpaDerivedJoin<X> joinLateral(@Nonnull Subquery<X> subquery, @Nonnull SqmJoinType joinType) -
join
@Nonnull public <X> JpaDerivedJoin<X> join(@Nonnull Subquery<X> subquery, @Nonnull SqmJoinType joinType, boolean lateral) -
join
public <X> JpaDerivedJoin<X> join(Subquery<X> subquery, SqmJoinType joinType, boolean lateral, String alias) -
join
-
join
@Nonnull public <X> SqmJoin<?,X> join(@Nonnull JpaCteCriteria<X> cte, @Nonnull SqmJoinType joinType) -
join
-
joinLateral
@Nonnull public <X> JpaFunctionJoin<X> joinLateral(@Nonnull JpaSetReturningFunction<X> function, @Nonnull 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
@Nonnull public <X> JpaFunctionJoin<X> join(@Nonnull JpaSetReturningFunction<X> function, @Nonnull SqmJoinType joinType) 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
@Nonnull public <X> JpaFunctionJoin<X> join(@Nonnull JpaSetReturningFunction<X> function, @Nonnull 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
@Nonnull public <X> JpaFunctionJoin<X> joinArray(@Nonnull String arrayAttributeName, @Nonnull SqmJoinType joinType) 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
@Nonnull public <X> JpaFunctionJoin<X> joinArray(@Nonnull SingularAttribute<? super T, X[]> arrayAttribute) Description copied from interface:JpaFromLike calling the overloadJpaFrom.joinArray(SingularAttribute, SqmJoinType)withSqmJoinType.INNER. -
joinArray
@Nonnull public <X> JpaFunctionJoin<X> joinArray(@Nonnull SingularAttribute<? super T, X[]> arrayAttribute, @Nonnull 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
@Nonnull public <X> JpaFunctionJoin<X> joinArrayCollection(@Nonnull String collectionAttributeName, @Nonnull 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
@Nonnull public <X> JpaFunctionJoin<X> joinArrayCollection(@Nonnull 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
@Nonnull public <X> JpaFunctionJoin<X> joinArrayCollection(@Nonnull SingularAttribute<? super T, ? extends Collection<X>> collectionAttribute, @Nonnull 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
@Nonnull public <A> SqmSingularJoin<T,A> fetch(@Nonnull SingularAttribute<? super T, A> attribute, @Nonnull JoinType jt) - Specified by:
fetchin interfaceFetchParent<O,T> - Specified by:
fetchin interfaceJpaFetchParent<O,T>
-
fetch
@Nonnull public <A> SqmAttributeJoin<T,A> fetch(@Nonnull PluralAttribute<? super T, ?, A> attribute) - Specified by:
fetchin interfaceFetchParent<O,T> - Specified by:
fetchin interfaceJpaFetchParent<O,T>
-
fetch
@Nonnull public <A> SqmAttributeJoin<T,A> fetch(@Nonnull PluralAttribute<? super T, ?, A> attribute, @Nonnull JoinType jt) - 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
@Nonnull public <A> SqmAttributeJoin<T,A> fetch(@Nonnull String attributeName, @Nonnull JoinType jt) - 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
@Nonnull public <S extends T> SqmTreatedFrom<O,T, treatAsS> (@Nonnull EntityDomainType<S> treatTarget) Description copied from interface:JpaPathSupport for JPA's explicit (TREAT) down-casting. -
treatAs
-
treatAs
-
treatAs
-
appendHqlString
- Specified by:
appendHqlStringin interfaceSqmVisitableNode
-
alias
- Specified by:
aliasin interfaceJpaSelection<O>- Specified by:
aliasin interfaceSelection<O>- Overrides:
aliasin classAbstractJpaSelection<T>
-
id
-
deepEquals
- Specified by:
deepEqualsin interfaceSqmFrom<O,T>
-
isDeepCompatible
- Specified by:
isDeepCompatiblein interfaceSqmFrom<O,T>
-