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
- Author:
- Steve Ebersole
- 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 SqmFrom<?,?>>
XaddTreat(X treat) Assigns an alias to the selection item.voidprotected 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) Create a fetch join to the specified collection-valued attribute using an inner join.<A> SqmAttributeJoin<T,A> fetch(PluralAttribute<? super T, ?, A> attribute, JoinType jt) Create a fetch join to the specified collection-valued attribute using the given join type.<A> SqmSingularJoin<T,A> fetch(SingularAttribute<? super T, A> attribute) Create a fetch join to the specified single-valued attribute using an inner join.<A> SqmSingularJoin<T,A> fetch(SingularAttribute<? super T, A> attribute, JoinType jt) Create a fetch join to the specified single-valued attribute using the given join type.<X,A> SqmAttributeJoin<X, A> Create a fetch join to the specified attribute using an inner join.<X,A> SqmAttributeJoin<X, A> Create a fetch join to the specified attribute using the given join type.protected <S,X extends SqmFrom<?, S>>
XfindTreat(ManagedDomainType<S> targetType, String alias) Returns the parentFromobject from which the correlatedFromobject has been obtained through correlation (use of aSubquerycorrelatemethod).Retrieve the explicit alias, if one.Return the fetch joins that have been made from this type.getJoins()Return the joins that have been made from this bound type.JpaPath<?>Return the parent "node" in the path or null if no parent.The joins associated with this SqmFromThe treats associated with this SqmFrombooleanhasJoins()booleanWhether theFromobject has been obtained as a result of correlation (use of aSubquerycorrelatemethod).<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) Create an inner join to the specified Collection-valued attribute.<E> SqmBagJoin<T,E> join(CollectionAttribute<? super T, E> attribute, JoinType jt) Create a join to the specified Collection-valued attribute using the given join type.<E> SqmListJoin<T,E> join(ListAttribute<? super T, E> attribute) Create an inner join to the specified List-valued attribute.<E> SqmListJoin<T,E> join(ListAttribute<? super T, E> attribute, JoinType jt) Create a join to the specified List-valued attribute using the given join type.<K,V> SqmMapJoin<T, K, V> join(MapAttribute<? super T, K, V> attribute) Create an inner join to the specified Map-valued attribute.<K,V> SqmMapJoin<T, K, V> join(MapAttribute<? super T, K, V> attribute, JoinType jt) Create a join to the specified Map-valued attribute using the given join type.<E> SqmSetJoin<T,E> join(SetAttribute<? super T, E> attribute) Create an inner join to the specified Set-valued attribute.<E> SqmSetJoin<T,E> join(SetAttribute<? super T, E> attribute, JoinType jt) Create a join to the specified Set-valued attribute using the given join type.<A> SqmSingularJoin<T,A> join(SingularAttribute<? super T, A> attribute) Create an inner join to the specified single-valued attribute.<A> SqmSingularJoin<T,A> join(SingularAttribute<? super T, A> attribute, JoinType jt) Create a join to the specified single-valued attribute using the given join type.<X> JpaEntityJoin<X><X> JpaEntityJoin<X>join(Class<X> entityJavaType, SqmJoinType joinType) <X,Y> SqmAttributeJoin<X, Y> Create an inner join to the specified attribute.<X,Y> SqmAttributeJoin<X, Y> Create a join to the specified attribute using the given join type.<X> JpaEntityJoin<X>join(EntityDomainType<X> entity) <X> JpaEntityJoin<X>join(EntityDomainType<X> entity, SqmJoinType joinType) <X> JpaJoinedFrom<?,X> join(JpaCteCriteria<X> cte) <X> JpaJoinedFrom<?,X> join(JpaCteCriteria<X> cte, SqmJoinType joinType) <X> JpaJoinedFrom<?,X> join(JpaCteCriteria<X> cte, SqmJoinType joinType, String alias) <X,Y> SqmBagJoin<X, Y> joinCollection(String attributeName) Create an inner join to the specified Collection-valued attribute.<X,Y> SqmBagJoin<X, Y> joinCollection(String attributeName, JoinType jt) Create a join to the specified Collection-valued attribute using the given join type.<X> JpaDerivedJoin<X>joinLateral(Subquery<X> subquery) <X> JpaDerivedJoin<X>joinLateral(Subquery<X> subquery, SqmJoinType joinType) <X,Y> SqmListJoin<X, Y> Create an inner join to the specified List-valued attribute.<X,Y> SqmListJoin<X, Y> Create a join to the specified List-valued attribute using the given join type.<X,K, V> SqmMapJoin<X, K, V> Create an inner join to the specified Map-valued attribute.<X,K, V> SqmMapJoin<X, K, V> Create a join to the specified Map-valued attribute using the given join type.<X,Y> SqmSetJoin<X, Y> Create an inner join to the specified Set-valued attribute.<X,Y> SqmSetJoin<X, Y> Create a join to the specified Set-valued attribute using the given join type.voidSqmPath<?>resolvePathPart(String name, boolean isTerminal, SqmCreationState creationState) voidsetExplicitAlias(String explicitAlias) Set the explicit alias for this pathvoidvisitSqmJoins(Consumer<SqmJoin<T, ?>> consumer) Visit all associated joinsMethods inherited from class org.hibernate.query.sqm.tree.domain.AbstractSqmPath
copyTo, get, get, get, get, getExpressible, getLhs, getModel, getNavigablePath, getNavigablePathCopy, getNodeType, getReferencedPathSource, getResolvedModel, getReusablePath, getReusablePaths, getTreatedPath, 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, equalTo, equalTo, getJavaTypeDescriptor, in, in, in, in, internalApplyInferableType, isNotNull, isNull, nodeBuilderMethods 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, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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, visitSubSelectableNodesMethods inherited from interface org.hibernate.query.sqm.tree.from.SqmFrom
copy, getReferencedPathSource, hasTreats, treatAs, treatAs, treatAs, treatAsMethods 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, getJavaTypeDescriptor, getLhs, getNavigablePath, getNodeType, getResolvedModel, getReusablePath, getReusablePaths, registerReusablePath, resolveAlias, 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>
-
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
-
addTreat
-
getParentPath
Description copied from interface:PathReturn the parent "node" in the path or null if no parent.- Specified by:
getParentPathin interfaceJpaPath<O>- Specified by:
getParentPathin interfacePath<O>- Returns:
- parent
-
getCorrelationParent
Description copied from interface:FromReturns the parentFromobject from which the correlatedFromobject has been obtained through correlation (use of aSubquerycorrelatemethod).- Specified by:
getCorrelationParentin interfaceFrom<O,T> - Specified by:
getCorrelationParentin interfaceJpaFrom<O,T> - Specified by:
getCorrelationParentin interfaceSqmFrom<O,T> - Returns:
- the parent of the correlated From object
-
createCorrelation
-
getJoins
Description copied from interface:FromReturn the joins that have been made from this bound type. Returns empty set if no joins have been made from this bound type. Modifications to the set do not affect the query. -
join
Description copied from interface:FromCreate an inner join to the specified single-valued attribute. -
join
Description copied from interface:FromCreate a join to the specified single-valued attribute using the given join type. -
join
Description copied from interface:FromCreate an inner join to the specified Collection-valued attribute. -
join
Description copied from interface:FromCreate a join to the specified Collection-valued attribute using the given join type. -
join
Description copied from interface:FromCreate an inner join to the specified Set-valued attribute. -
join
Description copied from interface:FromCreate a join to the specified Set-valued attribute using the given join type. -
join
Description copied from interface:FromCreate an inner join to the specified List-valued attribute. -
join
Description copied from interface:FromCreate a join to the specified List-valued attribute using the given join type. -
join
Description copied from interface:FromCreate an inner join to the specified Map-valued attribute. -
join
Description copied from interface:FromCreate a join to the specified Map-valued attribute using the given join type. -
join
Description copied from interface:FromCreate an inner join to the specified attribute. -
join
Description copied from interface:FromCreate a join to the specified attribute using the given join type. -
joinCollection
Description copied from interface:FromCreate an inner join to the specified Collection-valued attribute.- Specified by:
joinCollectionin interfaceFrom<O,T> - Specified by:
joinCollectionin interfaceJpaFrom<O,T> - Specified by:
joinCollectionin interfaceSqmFrom<O,T> - Parameters:
attributeName- name of the attribute for the target of the join- Returns:
- the resulting join
-
joinCollection
Description copied from interface:FromCreate a join to the specified Collection-valued attribute using the given join type.- Specified by:
joinCollectionin interfaceFrom<O,T> - Specified by:
joinCollectionin interfaceJpaFrom<O,T> - Specified by:
joinCollectionin interfaceSqmFrom<O,T> - Parameters:
attributeName- name of the attribute for the target of the joinjt- join type- Returns:
- the resulting join
-
joinSet
Description copied from interface:FromCreate an inner join to the specified Set-valued attribute. -
joinSet
Description copied from interface:FromCreate a join to the specified Set-valued attribute using the given join type. -
joinList
Description copied from interface:FromCreate an inner join to the specified List-valued attribute. -
joinList
Description copied from interface:FromCreate a join to the specified List-valued attribute using the given join type. -
joinMap
Description copied from interface:FromCreate an inner join to the specified Map-valued attribute. -
joinMap
Description copied from interface:FromCreate a join to the specified Map-valued attribute using the given join type. -
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
-
crossJoin
-
crossJoin
-
getFetches
Description copied from interface:FetchParentReturn the fetch joins that have been made from this type. Returns empty set if no fetch joins have been made from this type. Modifications to the set do not affect the query.- Specified by:
getFetchesin interfaceFetchParent<O,T> - Specified by:
getFetchesin interfaceJpaFetchParent<O,T> - Returns:
- fetch joins made from this type
-
fetch
Description copied from interface:FetchParentCreate a fetch join to the specified single-valued attribute using an inner join.- Specified by:
fetchin interfaceFetchParent<O,T> - Specified by:
fetchin interfaceJpaFetchParent<O,T> - Parameters:
attribute- target of the join- Returns:
- the resulting fetch join
-
fetch
Description copied from interface:FetchParentCreate a fetch join to the specified single-valued attribute using the given join type.- Specified by:
fetchin interfaceFetchParent<O,T> - Specified by:
fetchin interfaceJpaFetchParent<O,T> - Parameters:
attribute- target of the joinjt- join type- Returns:
- the resulting fetch join
-
fetch
Description copied from interface:FetchParentCreate a fetch join to the specified collection-valued attribute using an inner join.- Specified by:
fetchin interfaceFetchParent<O,T> - Specified by:
fetchin interfaceJpaFetchParent<O,T> - Parameters:
attribute- target of the join- Returns:
- the resulting join
-
fetch
Description copied from interface:FetchParentCreate a fetch join to the specified collection-valued attribute using the given join type.- Specified by:
fetchin interfaceFetchParent<O,T> - Specified by:
fetchin interfaceJpaFetchParent<O,T> - Parameters:
attribute- target of the joinjt- join type- Returns:
- the resulting join
-
fetch
Description copied from interface:FetchParentCreate a fetch join to the specified attribute using an inner join.- Specified by:
fetchin interfaceFetchParent<O,T> - Specified by:
fetchin interfaceJpaFetchParent<O,T> - Parameters:
attributeName- name of the attribute for the target of the join- Returns:
- the resulting fetch join
-
fetch
Description copied from interface:FetchParentCreate a fetch join to the specified attribute using the given join type.- Specified by:
fetchin interfaceFetchParent<O,T> - Specified by:
fetchin interfaceJpaFetchParent<O,T> - Parameters:
attributeName- name of the attribute for the target of the joinjt- join type- Returns:
- the resulting fetch join
-
appendHqlString
- Specified by:
appendHqlStringin interfaceSqmVisitableNode
-
alias
Description copied from interface:SelectionAssigns an alias to the selection item. Once assigned, an alias cannot be changed or reassigned. Returns the same selection item.- Specified by:
aliasin interfaceJpaSelection<O>- Specified by:
aliasin interfaceSelection<O>- Overrides:
aliasin classAbstractJpaSelection<T>- Parameters:
name- alias- Returns:
- selection item
-