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> SqmCorrelatedJoin<L,
,R> SqmCorrelatedSingularValuedJoin<L,
,R> SqmCorrelation<L,
,R> SqmFrom<L,
,R> SqmJoin<L,
,R> SqmPathWrapper<W,
,T> SqmSimplePath<T>
,SqmSingularValuedJoin<L,
,R> SqmTreatedAttributeJoin<L,
,R, R1> SqmTreatedFrom<L,
,R, R1> SqmTreatedJoin<L,
,R, R1> SqmTreatedPath<T,
S>
- All Known Implementing Classes:
AbstractSqmAttributeJoin
,AbstractSqmFrom
,AbstractSqmJoin
,AbstractSqmPath
,AbstractSqmPluralJoin
,AbstractSqmSimplePath
,AbstractSqmSpecificPluralPartPath
,AnyDiscriminatorSqmPath
,EmbeddedDiscriminatorSqmPath
,EntityDiscriminatorSqmPath
,NonAggregatedCompositeSimplePath
,SqmAnyValuedSimplePath
,SqmBagJoin
,SqmBasicValuedSimplePath
,SqmCorrelatedBagJoin
,SqmCorrelatedCrossJoin
,SqmCorrelatedEntityJoin
,SqmCorrelatedListJoin
,SqmCorrelatedMapJoin
,SqmCorrelatedPluralPartJoin
,SqmCorrelatedRoot
,SqmCorrelatedRootJoin
,SqmCorrelatedSetJoin
,SqmCorrelatedSingularJoin
,SqmCrossJoin
,SqmCteJoin
,SqmCteRoot
,SqmDerivedJoin
,SqmDerivedRoot
,SqmElementAggregateFunction
,SqmEmbeddedValuedSimplePath
,SqmEntityJoin
,SqmEntityValuedSimplePath
,SqmFkExpression
,SqmFunctionJoin
,SqmFunctionPath
,SqmFunctionRoot
,SqmIndexAggregateFunction
,SqmIndexedCollectionAccessPath
,SqmListJoin
,SqmMapJoin
,SqmPluralPartJoin
,SqmPluralValuedSimplePath
,SqmRoot
,SqmSetJoin
,SqmSingularJoin
,SqmTreatedBagJoin
,SqmTreatedCrossJoin
,SqmTreatedEmbeddedValuedSimplePath
,SqmTreatedEntityJoin
,SqmTreatedEntityValuedSimplePath
,SqmTreatedListJoin
,SqmTreatedMapJoin
,SqmTreatedPluralPartJoin
,SqmTreatedRoot
,SqmTreatedSetJoin
,SqmTreatedSimplePath
,SqmTreatedSingularJoin
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.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
applyInferableType
(@Nullable SqmExpressible<?> type) Used to apply type information based on the expression's usage within the query.copy
(SqmCopyContext context) default SqmRoot<?>
findRoot()
<K,
V, M extends Map<K, V>>
SqmExpression<M>get
(MapAttribute<? super T, K, V> map) <E,
C extends Collection<E>>
SqmExpression<C>get
(PluralAttribute<? super T, C, E> collection) <Y> SqmPath<Y>
get
(SingularAttribute<? super T, Y> attribute) <Y> SqmPath<Y>
default <Y> SqmPath<Y>
Same asget(String)
, but ifincludeSubtypes
is set totrue
and this path is polymorphic, also try finding subtype attributes.Retrieve the explicit alias, if one.SqmPath<?>
getLhs()
Get the left-hand side of this path - may be null, indicating a root, cross-join or entity-joinReturns the NavigablePath.This node's type is its "referenced path source"The path source that this path refers to (and that most likely created it).Get this path's actual resolved model, i.e.SqmPath<?>
getReusablePath
(String name) Returns an immutable List of reusable pathsvoid
registerReusablePath
(SqmPath<?> path) Register a reusable path relative to this pathdefault String
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>
SqmTreatedPath<T,S> Support for JPA's explicit (TREAT) down-casting.<S extends T>
SqmTreatedPath<T,S> <S extends T>
SqmTreatedPath<T,S> <S extends T>
SqmTreatedPath<T,S> treatAs
(EntityDomainType<S> treatTarget) Support for JPA's explicit (TREAT) down-casting.<S extends T>
SqmTreatedPath<T,S> treatAs
(EntityDomainType<S> treatTarget, String alias) <S extends T>
SqmTreatedPath<T,S> treatAs
(EntityDomainType<S> treatTarget, String alias, boolean fetch) SqmExpression<Class<? extends T>>
type()
void
visitReusablePaths
(Consumer<SqmPath<?>> consumer) Visit each reusable path relative to this pathMethods 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, notEqualTo, notEqualTo, visitSubSelectableNodes
Methods inherited from interface org.hibernate.query.sqm.tree.SqmNode
asLoggableText, nodeBuilder
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, appendHqlString, toHqlString
Methods inherited from interface jakarta.persistence.TupleElement
getAlias
-
Method Details
-
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
Set the explicit alias for this path -
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 -
getReusablePaths
Returns an immutable List of reusable paths -
visitReusablePaths
Visit each reusable path relative to this path -
registerReusablePath
Register a reusable path relative to this path -
getReusablePath
-
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
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
- Specified by:
getJavaTypeDescriptor
in interfaceJpaTupleElement<T>
-
treatAs
Description copied from interface:JpaPath
Support for JPA's explicit (TREAT) down-casting. -
treatAs
Description copied from interface:JpaPath
Support for JPA's explicit (TREAT) down-casting. -
treatAs
-
treatAs
-
treatAs
-
treatAs
<S extends T> SqmTreatedPath<T,S> treatAs(EntityDomainType<S> treatTarget, String alias, boolean fetch) -
findRoot
-
resolvePathPart
- Specified by:
resolvePathPart
in interfaceSemanticPathPart
-
resolveIndexedAccess
default SqmPath<?> resolveIndexedAccess(SqmExpression<?> selector, boolean isTerminal, SqmCreationState creationState) - Specified by:
resolveIndexedAccess
in interfaceSemanticPathPart
-
getResolvedModel
SqmPathSource<?> getResolvedModel()Get this path's actual resolved model, i.e. the concrete type for generic attributes. -
get
-
get
-
get
-
type
SqmExpression<Class<? extends T>> type() -
get
-
get
Same asget(String)
, but ifincludeSubtypes
is set totrue
and this path is polymorphic, also try finding subtype attributes. -
copy
- Specified by:
copy
in interfaceSqmExpression<T>
- Specified by:
copy
in interfaceSqmNode
- Specified by:
copy
in interfaceSqmSelectableNode<T>
- Specified by:
copy
in interfaceSqmTypedNode<T>