Class SqmRoot<E>
- 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<E,E>
-
- org.hibernate.query.sqm.tree.from.SqmRoot<E>
-
- All Implemented Interfaces:
Expression<E>
,FetchParent<E,E>
,From<E,E>
,Path<E>
,Root<E>
,Selection<E>
,TupleElement<E>
,Serializable
,JpaCriteriaNode
,JpaExpression<E>
,JpaFetchParent<E,E>
,JpaFrom<E,E>
,JpaPath<E>
,JpaRoot<E>
,JpaSelection<E>
,JpaTupleElement<E>
,SemanticPathPart
,SqmPath<E>
,SqmExpression<E>
,SqmFrom<E,E>
,SqmSelectableNode<E>
,SqmExpressibleAccessor<E>
,SqmNode
,SqmTypedNode<E>
,SqmVisitableNode
- Direct Known Subclasses:
SqmCorrelatedRoot
,SqmCorrelatedRootJoin
,SqmCteRoot
,SqmDerivedRoot
,SqmTreatedRoot
public class SqmRoot<E> extends AbstractSqmFrom<E,E> implements JpaRoot<E>
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description SqmRoot(EntityDomainType<E> entityType, String alias, boolean allowJoins, NodeBuilder nodeBuilder)
SqmRoot(NavigablePath navigablePath, EntityDomainType<E> entityType, String alias, NodeBuilder nodeBuilder)
protected
SqmRoot(NavigablePath navigablePath, SqmPathSource<E> referencedNavigable, String alias, boolean allowJoins, NodeBuilder nodeBuilder)
protected
SqmRoot(NavigablePath navigablePath, SqmPathSource<E> referencedNavigable, NodeBuilder nodeBuilder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <X> X
accept(SemanticQueryWalker<X> walker)
Accept the walker per visitationvoid
addOrderedJoin(SqmJoin<?,?> join)
void
addSqmJoin(SqmJoin<E,?> join)
Add an associated joinboolean
containsOnlyInnerJoins()
SqmRoot<E>
copy(SqmCopyContext context)
void
copyTo(SqmRoot<E> target, SqmCopyContext context)
SqmCorrelatedRoot<E>
createCorrelation()
SqmRoot<?>
findRoot()
String
getEntityName()
SqmPath<?>
getLhs()
Get the left-hand side of this path - may be null, indicating a root, cross-join or entity-joinEntityDomainType<E>
getManagedType()
EntityDomainType<E>
getModel()
List<SqmJoin<?,?>>
getOrderedJoins()
boolean
isAllowJoins()
String
toString()
<S extends E>
SqmTreatedRoot<E,S>treatAs(Class<S> treatJavaType)
Support for JPA's explicit (TREAT) down-casting.<S extends E>
SqmFrom<?,S>treatAs(Class<S> treatJavaType, String alias)
<S extends E>
SqmTreatedRoot<E,S>treatAs(EntityDomainType<S> treatTarget)
Support for JPA's explicit (TREAT) down-casting.<S extends E>
SqmFrom<?,S>treatAs(EntityDomainType<S> treatTarget, String alias)
-
Methods inherited from class org.hibernate.query.sqm.tree.domain.AbstractSqmFrom
addTreat, alias, appendHqlString, copyTo, crossJoin, crossJoin, fetch, fetch, fetch, fetch, fetch, fetch, findTreat, getCorrelationParent, getExplicitAlias, getFetches, getJoins, getParentPath, getSqmJoins, getSqmTreats, hasJoins, isCorrelated, join, join, join, join, join, join, join, join, join, join, join, join, join, join, join, join, join, join, join, join, join, join, join, joinCollection, joinCollection, joinLateral, joinLateral, joinList, joinList, joinMap, joinMap, joinSet, joinSet, removeLeftFetchJoins, resolvePathPart, setExplicitAlias, visitSqmJoins
-
Methods inherited from class org.hibernate.query.sqm.tree.domain.AbstractSqmPath
copyTo, get, get, get, get, getExpressible, getNavigablePath, getNavigablePathCopy, getNodeType, getReferencedPathSource, getResolvedModel, getReusablePath, getReusablePaths, getTreatedPath, registerReusablePath, resolvePath, resolvePath, 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 jakarta.persistence.criteria.From
getJoins, isCorrelated
-
Methods inherited from interface org.hibernate.query.criteria.JpaFetchParent
fetch, fetch, fetch, fetch, fetch, fetch, getFetches
-
Methods inherited from interface org.hibernate.query.criteria.JpaFrom
crossJoin, crossJoin, join, join, join, join, join, join, join, join, join, joinLateral, joinLateral
-
Methods inherited from interface org.hibernate.query.criteria.JpaPath
getParentPath
-
Methods inherited from interface org.hibernate.query.criteria.JpaSelection
alias, 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
getReferencedPathSource, hasTreats
-
Methods inherited from interface org.hibernate.query.sqm.tree.SqmNode
asLoggableText, nodeBuilder
-
Methods inherited from interface org.hibernate.query.sqm.tree.domain.SqmPath
applyInferableType, get, get, get, get, getJavaTypeDescriptor, 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
toHqlString
-
Methods inherited from interface jakarta.persistence.TupleElement
getAlias
-
-
-
-
Constructor Detail
-
SqmRoot
public SqmRoot(EntityDomainType<E> entityType, String alias, boolean allowJoins, NodeBuilder nodeBuilder)
-
SqmRoot
protected SqmRoot(NavigablePath navigablePath, SqmPathSource<E> referencedNavigable, NodeBuilder nodeBuilder)
-
SqmRoot
public SqmRoot(NavigablePath navigablePath, EntityDomainType<E> entityType, String alias, NodeBuilder nodeBuilder)
-
SqmRoot
protected SqmRoot(NavigablePath navigablePath, SqmPathSource<E> referencedNavigable, String alias, boolean allowJoins, NodeBuilder nodeBuilder)
-
-
Method Detail
-
copy
public SqmRoot<E> copy(SqmCopyContext context)
-
copyTo
@Internal public void copyTo(SqmRoot<E> target, SqmCopyContext context)
-
getLhs
public SqmPath<?> getLhs()
Description copied from interface:SqmPath
Get the left-hand side of this path - may be null, indicating a root, cross-join or entity-join
-
isAllowJoins
public boolean isAllowJoins()
-
addOrderedJoin
public void addOrderedJoin(SqmJoin<?,?> join)
-
addSqmJoin
public void addSqmJoin(SqmJoin<E,?> join)
Description copied from interface:SqmFrom
Add an associated join- Specified by:
addSqmJoin
in interfaceSqmFrom<E,E>
- Overrides:
addSqmJoin
in classAbstractSqmFrom<E,E>
-
getEntityName
public String getEntityName()
-
toString
public String toString()
- Overrides:
toString
in classAbstractSqmPath<E>
-
accept
public <X> X accept(SemanticQueryWalker<X> walker)
Description copied from interface:SqmVisitableNode
Accept the walker per visitation- Specified by:
accept
in interfaceSqmVisitableNode
-
getModel
public EntityDomainType<E> getModel()
-
getManagedType
public EntityDomainType<E> getManagedType()
- Specified by:
getManagedType
in interfaceJpaRoot<E>
-
createCorrelation
public SqmCorrelatedRoot<E> createCorrelation()
- Specified by:
createCorrelation
in classAbstractSqmFrom<E,E>
-
containsOnlyInnerJoins
public boolean containsOnlyInnerJoins()
-
treatAs
public <S extends E> SqmTreatedRoot<E,S> treatAs(Class<S> treatJavaType) throws PathException
Description copied from interface:JpaPath
Support for JPA's explicit (TREAT) down-casting.
-
treatAs
public <S extends E> SqmTreatedRoot<E,S> treatAs(EntityDomainType<S> treatTarget) throws PathException
Description copied from interface:JpaPath
Support for JPA's explicit (TREAT) down-casting.
-
-