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 protected
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
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addSqmJoin(SqmJoin<T,?> join)
Add an associated joinprotected <X extends SqmFrom<?,?>>
XaddTreat(X treat)
JpaSelection<T>
alias(String name)
void
appendHqlString(StringBuilder sb)
protected void
copyTo(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(EntityDomainType<S> targetType, String alias)
SqmFrom<O,T>
getCorrelationParent()
String
getExplicitAlias()
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 SqmFromboolean
hasJoins()
boolean
hasTreats()
boolean
isCorrelated()
<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)
SqmPath<?>
resolvePathPart(String name, boolean isTerminal, SqmCreationState creationState)
void
setExplicitAlias(String explicitAlias)
Set the explicit alias for this pathvoid
visitSqmJoins(Consumer<SqmJoin<T,?>> consumer)
Visit all associated joins-
Methods inherited from class org.hibernate.query.sqm.tree.domain.AbstractSqmPath
copyTo, get, get, get, get, 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
-
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, castAs, equalTo, equalTo, in, in, in, in, isNotNull, isNull, visitSubSelectableNodes
-
Methods inherited from interface org.hibernate.query.sqm.tree.from.SqmFrom
copy, getReferencedPathSource, 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 withSqmTreatedRoot
toSqmRoot
-
AbstractSqmFrom
protected AbstractSqmFrom(NavigablePath navigablePath, SqmPathSource<T> referencedNavigable, NodeBuilder nodeBuilder)
Intended for use withSqmCorrelatedRootJoin
throughSqmRoot
-
-
Method Detail
-
copyTo
protected void copyTo(AbstractSqmFrom<O,T> target, SqmCopyContext context)
-
getExplicitAlias
public String 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
public void setExplicitAlias(String explicitAlias)
Description copied from interface:SqmPath
Set the explicit alias for this path- Specified by:
setExplicitAlias
in interfaceSqmPath<O>
- Overrides:
setExplicitAlias
in classAbstractSqmPath<T>
-
resolvePathPart
public SqmPath<?> resolvePathPart(String name, boolean isTerminal, SqmCreationState creationState)
- Specified by:
resolvePathPart
in interfaceSemanticPathPart
- Specified by:
resolvePathPart
in interfaceSqmPath<O>
-
getSqmJoins
public List<SqmJoin<T,?>> getSqmJoins()
Description copied from interface:SqmFrom
The joins associated with this SqmFrom- Specified by:
getSqmJoins
in interfaceSqmFrom<O,T>
-
addSqmJoin
public void addSqmJoin(SqmJoin<T,?> join)
Description copied from interface:SqmFrom
Add an associated join- Specified by:
addSqmJoin
in interfaceSqmFrom<O,T>
-
visitSqmJoins
public void visitSqmJoins(Consumer<SqmJoin<T,?>> consumer)
Description copied from interface:SqmFrom
Visit all associated joins- Specified by:
visitSqmJoins
in interfaceSqmFrom<O,T>
-
getSqmTreats
public List<SqmFrom<?,?>> getSqmTreats()
Description copied from interface:SqmFrom
The treats associated with this SqmFrom- Specified by:
getSqmTreats
in interfaceSqmFrom<O,T>
-
findTreat
protected <S,X extends SqmFrom<?,S>> X findTreat(EntityDomainType<S> targetType, String alias)
-
addTreat
protected <X extends SqmFrom<?,?>> X addTreat(X treat)
-
getParentPath
public JpaPath<?> getParentPath()
- Specified by:
getParentPath
in interfaceJpaPath<O>
- Specified by:
getParentPath
in interfacePath<O>
-
getCorrelationParent
public SqmFrom<O,T> getCorrelationParent()
- Specified by:
getCorrelationParent
in interfaceFrom<O,T>
- Specified by:
getCorrelationParent
in interfaceJpaFrom<O,T>
- Specified by:
getCorrelationParent
in interfaceSqmFrom<O,T>
-
createCorrelation
public abstract SqmCorrelation<O,T> createCorrelation()
-
isCorrelated
public boolean isCorrelated()
- Specified by:
isCorrelated
in 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:
joinCollection
in interfaceFrom<O,T>
- Specified by:
joinCollection
in interfaceJpaFrom<O,T>
- Specified by:
joinCollection
in interfaceSqmFrom<O,T>
-
joinCollection
public <X,Y> SqmBagJoin<X,Y> joinCollection(String attributeName, JoinType jt)
- Specified by:
joinCollection
in interfaceFrom<O,T>
- Specified by:
joinCollection
in interfaceJpaFrom<O,T>
- Specified by:
joinCollection
in 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:
joinLateral
in interfaceJpaFrom<O,T>
-
joinLateral
public <X> JpaDerivedJoin<X> joinLateral(Subquery<X> subquery, SqmJoinType joinType)
- Specified by:
joinLateral
in 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:
getFetches
in interfaceFetchParent<O,T>
- Specified by:
getFetches
in interfaceJpaFetchParent<O,T>
-
fetch
public <A> SqmSingularJoin<T,A> fetch(SingularAttribute<? super T,A> attribute)
- Specified by:
fetch
in interfaceFetchParent<O,T>
- Specified by:
fetch
in interfaceJpaFetchParent<O,T>
-
fetch
public <A> SqmSingularJoin<T,A> fetch(SingularAttribute<? super T,A> attribute, JoinType jt)
- Specified by:
fetch
in interfaceFetchParent<O,T>
- Specified by:
fetch
in interfaceJpaFetchParent<O,T>
-
fetch
public <A> SqmAttributeJoin<T,A> fetch(PluralAttribute<? super T,?,A> attribute)
- Specified by:
fetch
in interfaceFetchParent<O,T>
- Specified by:
fetch
in interfaceJpaFetchParent<O,T>
-
fetch
public <A> SqmAttributeJoin<T,A> fetch(PluralAttribute<? super T,?,A> attribute, JoinType jt)
- Specified by:
fetch
in interfaceFetchParent<O,T>
- Specified by:
fetch
in interfaceJpaFetchParent<O,T>
-
fetch
public <X,A> SqmAttributeJoin<X,A> fetch(String attributeName)
- Specified by:
fetch
in interfaceFetchParent<O,T>
- Specified by:
fetch
in interfaceJpaFetchParent<O,T>
-
fetch
public <X,A> SqmAttributeJoin<X,A> fetch(String attributeName, JoinType jt)
- Specified by:
fetch
in interfaceFetchParent<O,T>
- Specified by:
fetch
in interfaceJpaFetchParent<O,T>
-
appendHqlString
public void appendHqlString(StringBuilder sb)
- Specified by:
appendHqlString
in interfaceSqmVisitableNode
-
alias
public JpaSelection<T> alias(String name)
- Specified by:
alias
in interfaceJpaSelection<O>
- Specified by:
alias
in interfaceSelection<O>
- Overrides:
alias
in classAbstractSqmExpression<T>
-
-