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
public abstract class AbstractSqmFrom<O,T> extends AbstractSqmPath<T> implements SqmFrom<O,T>
Convenience base class for SqmFrom implementations- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractSqmFrom(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
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddSqmJoin(SqmJoin<T,?> join)Add an associated joinprotected <X extends SqmFrom<?,?>>
XaddTreat(X treat)JpaSelection<T>alias(String name)voidappendHqlString(StringBuilder sb)protected voidcopyTo(AbstractSqmFrom<O,T> target, SqmCopyContext context)abstract SqmCorrelation<O,T>createCorrelation()<X> JpaCrossJoin<X>crossJoin(Class<X> entityJavaType)<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>fetch(String attributeName)<X,A>
SqmAttributeJoin<X,A>fetch(String attributeName, JoinType jt)protected <S,X extends SqmFrom<?,S>>
XfindTreat(ManagedDomainType<S> targetType, String alias)SqmFrom<O,T>getCorrelationParent()StringgetExplicitAlias()Retrieve the explicit alias, if one.Set<Fetch<T,?>>getFetches()Set<Join<T,?>>getJoins()JpaPath<?>getParentPath()List<SqmJoin<T,?>>getSqmJoins()The joins associated with this SqmFromList<SqmFrom<?,?>>getSqmTreats()The treats associated with this SqmFrombooleanhasJoins()booleanisCorrelated()<X> JpaDerivedJoin<X>join(Subquery<X> subquery)<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)<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)<X> JpaEntityJoin<X>join(Class<X> entityJavaType)<X> JpaEntityJoin<X>join(Class<X> entityJavaType, SqmJoinType joinType)<X,Y>
SqmAttributeJoin<X,Y>join(String attributeName)<X,Y>
SqmAttributeJoin<X,Y>join(String attributeName, JoinType jt)<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)<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,Y>
SqmListJoin<X,Y>joinList(String attributeName)<X,Y>
SqmListJoin<X,Y>joinList(String attributeName, JoinType jt)<X,K,V>
SqmMapJoin<X,K,V>joinMap(String attributeName)<X,K,V>
SqmMapJoin<X,K,V>joinMap(String attributeName, JoinType jt)<X,Y>
SqmSetJoin<X,Y>joinSet(String attributeName)<X,Y>
SqmSetJoin<X,Y>joinSet(String attributeName, JoinType jt)voidremoveLeftFetchJoins()SqmPath<?>resolvePathPart(String name, boolean isTerminal, SqmCreationState creationState)voidsetExplicitAlias(String explicitAlias)Set the explicit alias for this pathvoidvisitSqmJoins(Consumer<SqmJoin<T,?>> consumer)Visit all associated joins-
Methods 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, visitReusablePaths
-
Methods 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, nodeBuilder
-
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.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, visitSubSelectableNodes
-
Methods inherited from interface org.hibernate.query.sqm.tree.from.SqmFrom
copy, getReferencedPathSource, hasTreats, treatAs, treatAs, treatAs, treatAs
-
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, 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 Detail
-
AbstractSqmFrom
protected AbstractSqmFrom(NavigablePath navigablePath, SqmPathSource<T> referencedNavigable, SqmFrom<?,?> lhs, String alias, NodeBuilder nodeBuilder)
-
AbstractSqmFrom
protected AbstractSqmFrom(EntityDomainType<T> entityType, String alias, NodeBuilder nodeBuilder)
Intended for use withSqmRoot
-
AbstractSqmFrom
protected AbstractSqmFrom(NavigablePath navigablePath, SqmPathSource<T> entityType, String alias, NodeBuilder nodeBuilder)
Intended for use withSqmTreatedRoottoSqmRoot
-
AbstractSqmFrom
protected AbstractSqmFrom(NavigablePath navigablePath, SqmPathSource<T> referencedNavigable, NodeBuilder nodeBuilder)
Intended for use withSqmCorrelatedRootJointhroughSqmRoot
-
-
Method Detail
-
copyTo
protected void copyTo(AbstractSqmFrom<O,T> target, SqmCopyContext context)
-
getExplicitAlias
public String getExplicitAlias()
Description copied from interface:SqmPathRetrieve the explicit alias, if one. May return null- Specified by:
getExplicitAliasin interfaceSqmPath<O>- Overrides:
getExplicitAliasin classAbstractSqmPath<T>
-
setExplicitAlias
public void setExplicitAlias(String explicitAlias)
Description copied from interface:SqmPathSet the explicit alias for this path- Specified by:
setExplicitAliasin interfaceSqmPath<O>- Overrides:
setExplicitAliasin classAbstractSqmPath<T>
-
resolvePathPart
public SqmPath<?> resolvePathPart(String name, boolean isTerminal, SqmCreationState creationState)
- Specified by:
resolvePathPartin interfaceSemanticPathPart- Specified by:
resolvePathPartin interfaceSqmPath<O>
-
getSqmJoins
public List<SqmJoin<T,?>> getSqmJoins()
Description copied from interface:SqmFromThe joins associated with this SqmFrom- Specified by:
getSqmJoinsin interfaceSqmFrom<O,T>
-
addSqmJoin
public void addSqmJoin(SqmJoin<T,?> join)
Description copied from interface:SqmFromAdd an associated join- Specified by:
addSqmJoinin interfaceSqmFrom<O,T>
-
removeLeftFetchJoins
@Internal public void removeLeftFetchJoins()
-
visitSqmJoins
public void visitSqmJoins(Consumer<SqmJoin<T,?>> consumer)
Description copied from interface:SqmFromVisit all associated joins- Specified by:
visitSqmJoinsin interfaceSqmFrom<O,T>
-
getSqmTreats
public List<SqmFrom<?,?>> getSqmTreats()
Description copied from interface:SqmFromThe treats associated with this SqmFrom- Specified by:
getSqmTreatsin interfaceSqmFrom<O,T>
-
findTreat
protected <S,X extends SqmFrom<?,S>> X findTreat(ManagedDomainType<S> targetType, String alias)
-
addTreat
protected <X extends SqmFrom<?,?>> X addTreat(X treat)
-
getParentPath
public JpaPath<?> getParentPath()
- Specified by:
getParentPathin interfaceJpaPath<O>- Specified by:
getParentPathin interfacePath<O>
-
getCorrelationParent
public SqmFrom<O,T> getCorrelationParent()
- Specified by:
getCorrelationParentin interfaceFrom<O,T>- Specified by:
getCorrelationParentin interfaceJpaFrom<O,T>- Specified by:
getCorrelationParentin interfaceSqmFrom<O,T>
-
createCorrelation
public abstract SqmCorrelation<O,T> createCorrelation()
-
isCorrelated
public boolean isCorrelated()
- Specified by:
isCorrelatedin interfaceFrom<O,T>
-
join
public <A> SqmSingularJoin<T,A> join(SingularAttribute<? super T,A> attribute)
-
join
public <A> SqmSingularJoin<T,A> join(SingularAttribute<? super T,A> attribute, JoinType jt)
-
join
public <A> SqmBagJoin<T,A> join(CollectionAttribute<? super T,A> attribute)
-
join
public <E> SqmBagJoin<T,E> join(CollectionAttribute<? super T,E> attribute, JoinType jt)
-
join
public <E> SqmSetJoin<T,E> join(SetAttribute<? super T,E> attribute)
-
join
public <E> SqmSetJoin<T,E> join(SetAttribute<? super T,E> attribute, JoinType jt)
-
join
public <E> SqmListJoin<T,E> join(ListAttribute<? super T,E> attribute)
-
join
public <E> SqmListJoin<T,E> join(ListAttribute<? super T,E> attribute, JoinType jt)
-
join
public <K,V> SqmMapJoin<T,K,V> join(MapAttribute<? super T,K,V> attribute)
-
join
public <K,V> SqmMapJoin<T,K,V> join(MapAttribute<? super T,K,V> attribute, JoinType jt)
-
join
public <X,Y> SqmAttributeJoin<X,Y> join(String attributeName)
-
join
public <X,Y> SqmAttributeJoin<X,Y> join(String attributeName, JoinType jt)
-
joinCollection
public <X,Y> SqmBagJoin<X,Y> joinCollection(String attributeName)
- Specified by:
joinCollectionin interfaceFrom<O,T>- Specified by:
joinCollectionin interfaceJpaFrom<O,T>- Specified by:
joinCollectionin interfaceSqmFrom<O,T>
-
joinCollection
public <X,Y> SqmBagJoin<X,Y> joinCollection(String attributeName, JoinType jt)
- Specified by:
joinCollectionin interfaceFrom<O,T>- Specified by:
joinCollectionin interfaceJpaFrom<O,T>- Specified by:
joinCollectionin interfaceSqmFrom<O,T>
-
joinSet
public <X,Y> SqmSetJoin<X,Y> joinSet(String attributeName)
-
joinSet
public <X,Y> SqmSetJoin<X,Y> joinSet(String attributeName, JoinType jt)
-
joinList
public <X,Y> SqmListJoin<X,Y> joinList(String attributeName)
-
joinList
public <X,Y> SqmListJoin<X,Y> joinList(String attributeName, JoinType jt)
-
joinMap
public <X,K,V> SqmMapJoin<X,K,V> joinMap(String attributeName)
-
joinMap
public <X,K,V> SqmMapJoin<X,K,V> joinMap(String attributeName, JoinType jt)
-
join
public <X> JpaEntityJoin<X> join(Class<X> entityJavaType)
-
join
public <X> JpaEntityJoin<X> join(EntityDomainType<X> entity)
-
join
public <X> JpaEntityJoin<X> join(Class<X> entityJavaType, SqmJoinType joinType)
-
join
public <X> JpaEntityJoin<X> join(EntityDomainType<X> entity, SqmJoinType joinType)
-
join
public <X> JpaDerivedJoin<X> join(Subquery<X> subquery)
-
join
public <X> JpaDerivedJoin<X> join(Subquery<X> subquery, SqmJoinType joinType)
-
joinLateral
public <X> JpaDerivedJoin<X> joinLateral(Subquery<X> subquery)
- Specified by:
joinLateralin interfaceJpaFrom<O,T>
-
joinLateral
public <X> JpaDerivedJoin<X> joinLateral(Subquery<X> subquery, SqmJoinType joinType)
- Specified by:
joinLateralin interfaceJpaFrom<O,T>
-
join
public <X> JpaDerivedJoin<X> join(Subquery<X> subquery, SqmJoinType joinType, boolean lateral)
-
join
public <X> JpaDerivedJoin<X> join(Subquery<X> subquery, SqmJoinType joinType, boolean lateral, String alias)
-
join
public <X> JpaJoinedFrom<?,X> join(JpaCteCriteria<X> cte)
-
join
public <X> JpaJoinedFrom<?,X> join(JpaCteCriteria<X> cte, SqmJoinType joinType)
-
join
public <X> JpaJoinedFrom<?,X> join(JpaCteCriteria<X> cte, SqmJoinType joinType, String alias)
-
crossJoin
public <X> JpaCrossJoin<X> crossJoin(Class<X> entityJavaType)
-
crossJoin
public <X> JpaCrossJoin<X> crossJoin(EntityDomainType<X> entity)
-
getFetches
public Set<Fetch<T,?>> getFetches()
- Specified by:
getFetchesin interfaceFetchParent<O,T>- Specified by:
getFetchesin interfaceJpaFetchParent<O,T>
-
fetch
public <A> SqmSingularJoin<T,A> fetch(SingularAttribute<? super T,A> attribute)
- Specified by:
fetchin interfaceFetchParent<O,T>- Specified by:
fetchin interfaceJpaFetchParent<O,T>
-
fetch
public <A> SqmSingularJoin<T,A> fetch(SingularAttribute<? super T,A> attribute, JoinType jt)
- Specified by:
fetchin interfaceFetchParent<O,T>- Specified by:
fetchin interfaceJpaFetchParent<O,T>
-
fetch
public <A> SqmAttributeJoin<T,A> fetch(PluralAttribute<? super T,?,A> attribute)
- Specified by:
fetchin interfaceFetchParent<O,T>- Specified by:
fetchin interfaceJpaFetchParent<O,T>
-
fetch
public <A> SqmAttributeJoin<T,A> fetch(PluralAttribute<? super T,?,A> attribute, JoinType jt)
- Specified by:
fetchin interfaceFetchParent<O,T>- Specified by:
fetchin interfaceJpaFetchParent<O,T>
-
fetch
public <X,A> SqmAttributeJoin<X,A> fetch(String attributeName)
- Specified by:
fetchin interfaceFetchParent<O,T>- Specified by:
fetchin interfaceJpaFetchParent<O,T>
-
fetch
public <X,A> SqmAttributeJoin<X,A> fetch(String attributeName, JoinType jt)
- Specified by:
fetchin interfaceFetchParent<O,T>- Specified by:
fetchin interfaceJpaFetchParent<O,T>
-
appendHqlString
public void appendHqlString(StringBuilder sb)
- Specified by:
appendHqlStringin interfaceSqmVisitableNode
-
alias
public JpaSelection<T> alias(String name)
- Specified by:
aliasin interfaceJpaSelection<O>- Specified by:
aliasin interfaceSelection<O>- Overrides:
aliasin classAbstractJpaSelection<T>
-
-