Interface SqmPath<T>
-
- All Superinterfaces:
Expression<T>
,JpaCriteriaNode
,JpaExpression<T>
,JpaPath<T>
,JpaSelection<T>
,JpaTupleElement<T>
,Path<T>
,Selection<T>
,SemanticPathPart
,Serializable
,SqmExpressibleAccessor<T>
,SqmExpression<T>
,SqmNode
,SqmSelectableNode<T>
,SqmTypedNode<T>
,SqmVisitableNode
,TupleElement<T>
- All Known Subinterfaces:
DiscriminatorSqmPath<T>
,SqmAttributeJoin<O,T>
,SqmCorrelation<O,T>
,SqmFrom<O,T>
,SqmJoin<O,T>
,SqmPathWrapper<W,T>
,SqmQualifiedJoin<O,T>
,SqmSimplePath<T>
,SqmTreatedPath<T,S>
- All Known Implementing Classes:
AbstractSqmAttributeJoin
,AbstractSqmFrom
,AbstractSqmJoin
,AbstractSqmPath
,AbstractSqmPluralJoin
,AbstractSqmQualifiedJoin
,AbstractSqmSimplePath
,AbstractSqmSpecificPluralPartPath
,AnyDiscriminatorSqmPath
,EntityDiscriminatorSqmPath
,NonAggregatedCompositeSimplePath
,SqmAnyValuedSimplePath
,SqmBagJoin
,SqmBasicValuedSimplePath
,SqmCorrelatedBagJoin
,SqmCorrelatedCrossJoin
,SqmCorrelatedEntityJoin
,SqmCorrelatedListJoin
,SqmCorrelatedMapJoin
,SqmCorrelatedPluralPartJoin
,SqmCorrelatedRoot
,SqmCorrelatedRootJoin
,SqmCorrelatedSetJoin
,SqmCorrelatedSingularJoin
,SqmCrossJoin
,SqmCteJoin
,SqmCteRoot
,SqmDerivedJoin
,SqmDerivedRoot
,SqmElementAggregateFunction
,SqmEmbeddedValuedSimplePath
,SqmEntityJoin
,SqmEntityValuedSimplePath
,SqmIndexAggregateFunction
,SqmIndexedCollectionAccessPath
,SqmListJoin
,SqmMapJoin
,SqmPluralPartJoin
,SqmPluralValuedSimplePath
,SqmRoot
,SqmSetJoin
,SqmSingularJoin
,SqmTreatedBagJoin
,SqmTreatedCrossJoin
,SqmTreatedEntityJoin
,SqmTreatedListJoin
,SqmTreatedMapJoin
,SqmTreatedPluralPartJoin
,SqmTreatedRoot
,SqmTreatedSetJoin
,SqmTreatedSimplePath
,SqmTreatedSingularJoin
public interface SqmPath<T> extends SqmExpression<T>, SemanticPathPart, JpaPath<T>
Models a reference to a part of the application's domain model as part of an SQM tree. This correlates roughly to the JPA Criteria notion of Path, hence the name.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
applyInferableType(SqmExpressible<?> type)
Used to apply type information based on the expression's usage within the query.SqmPath<T>
copy(SqmCopyContext context)
default SqmRoot<?>
findRoot()
<K,V,M extends Map<K,V>>
SqmExpression<M>get(MapAttribute<T,K,V> map)
<E,C extends Collection<E>>
SqmExpression<C>get(PluralAttribute<T,C,E> collection)
<Y> SqmPath<Y>
get(SingularAttribute<? super T,Y> attribute)
<Y> SqmPath<Y>
get(String attributeName)
String
getExplicitAlias()
Retrieve the explicit alias, if one.default JavaType<T>
getJavaTypeDescriptor()
SqmPath<?>
getLhs()
Get the left-hand side of this path - may be null, indicating a root, cross-join or entity-joinNavigablePath
getNavigablePath()
Returns the NavigablePath.SqmPathSource<T>
getNodeType()
This node's type is its "referenced path source"SqmPathSource<?>
getReferencedPathSource()
The path source that this path refers to (and that most likely created it).SqmPath<?>
getReusablePath(String name)
List<SqmPath<?>>
getReusablePaths()
Returns an immutable List of reusable pathsvoid
registerReusablePath(SqmPath<?> path)
Register a reusable path relative to this pathdefault String
resolveAlias()
Retrieve the explicit alias, if one, otherwise return a generated one and set that as explicit alias.default SqmPath<?>
resolveIndexedAccess(SqmExpression<?> selector, boolean isTerminal, SqmCreationState creationState)
SqmPath<?>
resolvePathPart(String name, boolean isTerminal, SqmCreationState creationState)
void
setExplicitAlias(String explicitAlias)
Set the explicit alias for this path<S extends T>
SqmPath<S>treatAs(Class<S> treatJavaType)
Support for JPA's explicit (TREAT) down-casting.<S extends T>
SqmPath<S>treatAs(EntityDomainType<S> treatTarget)
Support for JPA's explicit (TREAT) down-casting.SqmExpression<Class<? extends T>>
type()
void
visitReusablePaths(Consumer<SqmPath<?>> consumer)
Visit each reusable path relative to this path-
Methods inherited from interface org.hibernate.query.criteria.JpaPath
getParentPath, getResolvedModel
-
Methods inherited from interface org.hibernate.query.criteria.JpaSelection
alias, 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, in, in, in, in, isNotNull, isNull, visitSubSelectableNodes
-
Methods inherited from interface org.hibernate.query.sqm.tree.SqmNode
asLoggableText, nodeBuilder
-
Methods inherited from interface org.hibernate.query.sqm.tree.SqmTypedNode
getExpressible, getNodeJavaType
-
Methods inherited from interface org.hibernate.query.sqm.tree.SqmVisitableNode
accept, appendHqlString, toHqlString
-
Methods inherited from interface jakarta.persistence.TupleElement
getAlias
-
-
-
-
Method Detail
-
getNavigablePath
NavigablePath getNavigablePath()
Returns the NavigablePath.- Specified by:
getNavigablePath
in interfaceJpaPath<T>
-
getReferencedPathSource
SqmPathSource<?> getReferencedPathSource()
The path source that this path refers to (and that most likely created it).
-
getExplicitAlias
String getExplicitAlias()
Retrieve the explicit alias, if one. May return null
-
setExplicitAlias
void setExplicitAlias(String explicitAlias)
Set the explicit alias for this path
-
resolveAlias
default String resolveAlias()
Retrieve the explicit alias, if one, otherwise return a generated one and set that as explicit alias.
-
getLhs
SqmPath<?> getLhs()
Get the left-hand side of this path - may be null, indicating a root, cross-join or entity-join
-
visitReusablePaths
void visitReusablePaths(Consumer<SqmPath<?>> consumer)
Visit each reusable path relative to this path
-
registerReusablePath
void registerReusablePath(SqmPath<?> path)
Register a reusable path relative to this path
-
getNodeType
SqmPathSource<T> getNodeType()
This node's type is its "referenced path source"- Specified by:
getNodeType
in interfaceSqmExpression<T>
- Specified by:
getNodeType
in interfaceSqmTypedNode<T>
-
applyInferableType
default void applyInferableType(SqmExpressible<?> type)
Description copied from interface:SqmExpression
Used to apply type information based on the expression's usage within the query.- Specified by:
applyInferableType
in interfaceSqmExpression<T>
-
getJavaTypeDescriptor
default JavaType<T> getJavaTypeDescriptor()
- Specified by:
getJavaTypeDescriptor
in interfaceJpaTupleElement<T>
-
treatAs
<S extends T> SqmPath<S> treatAs(Class<S> treatJavaType)
Description copied from interface:JpaPath
Support for JPA's explicit (TREAT) down-casting.
-
treatAs
<S extends T> SqmPath<S> treatAs(EntityDomainType<S> treatTarget)
Description copied from interface:JpaPath
Support for JPA's explicit (TREAT) down-casting.
-
findRoot
default SqmRoot<?> findRoot()
-
resolvePathPart
SqmPath<?> resolvePathPart(String name, boolean isTerminal, SqmCreationState creationState)
- Specified by:
resolvePathPart
in interfaceSemanticPathPart
-
resolveIndexedAccess
default SqmPath<?> resolveIndexedAccess(SqmExpression<?> selector, boolean isTerminal, SqmCreationState creationState)
- Specified by:
resolveIndexedAccess
in interfaceSemanticPathPart
-
get
<Y> SqmPath<Y> get(SingularAttribute<? super T,Y> attribute)
-
get
<E,C extends Collection<E>> SqmExpression<C> get(PluralAttribute<T,C,E> collection)
-
get
<K,V,M extends Map<K,V>> SqmExpression<M> get(MapAttribute<T,K,V> map)
-
type
SqmExpression<Class<? extends T>> type()
-
copy
SqmPath<T> copy(SqmCopyContext context)
- Specified by:
copy
in interfaceSqmExpression<T>
- Specified by:
copy
in interfaceSqmNode
- Specified by:
copy
in interfaceSqmSelectableNode<T>
- Specified by:
copy
in interfaceSqmTypedNode<T>
-
-