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,SqmCorrelatedCteJoin,SqmCorrelatedDerivedJoin,SqmCorrelatedDerivedRoot,SqmCorrelatedDerivedRootJoin,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 voidapplyInferableType(@Nullable SqmBindableType<?> 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 ifincludeSubtypesis set totrueand 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 pathsvoidregisterReusablePath(SqmPath<?> path) Register a reusable path relative to this pathdefault SqmPath<?> resolveIndexedAccess(SqmExpression<?> selector, boolean isTerminal, SqmCreationState creationState) SqmPath<?> resolvePathPart(String name, boolean isTerminal, SqmCreationState creationState) voidsetExplicitAlias(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()voidvisitReusablePaths(Consumer<SqmPath<?>> consumer) Visit each reusable path relative to this pathMethods inherited from interface org.hibernate.query.criteria.JpaPath
getParentPathMethods inherited from interface org.hibernate.query.criteria.JpaSelection
alias, getCompoundSelectionItems, getSelectionItemsMethods inherited from interface org.hibernate.query.criteria.JpaTupleElement
getJavaType, getJavaTypeName, isEnumMethods inherited from interface jakarta.persistence.criteria.Selection
isCompoundSelectionMethods 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, visitSubSelectableNodesMethods inherited from interface org.hibernate.query.sqm.tree.SqmNode
asLoggableText, nodeBuilderMethods inherited from interface org.hibernate.query.sqm.tree.select.SqmSelectableNode
getTupleLengthMethods inherited from interface org.hibernate.query.sqm.tree.SqmTypedNode
getExpressible, getNodeJavaTypeMethods inherited from interface org.hibernate.query.sqm.tree.SqmVisitableNode
accept, appendHqlString, toHqlStringMethods 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).- See Also:
-
getExplicitAlias
String getExplicitAlias()Retrieve the explicit alias, if one. May return null -
setExplicitAlias
Set the explicit alias for this path -
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
SqmBindableType<T> getNodeType()This node's type is its "referenced path source"- Specified by:
getNodeTypein interfaceSqmExpression<T>- Specified by:
getNodeTypein interfaceSqmTypedNode<T>
-
applyInferableType
Description copied from interface:SqmExpressionUsed to apply type information based on the expression's usage within the query.- Specified by:
applyInferableTypein interfaceSqmExpression<T>
-
getJavaTypeDescriptor
- Specified by:
getJavaTypeDescriptorin interfaceJpaTupleElement<T>
-
treatAs
Description copied from interface:JpaPathSupport for JPA's explicit (TREAT) down-casting. -
treatAs
Description copied from interface:JpaPathSupport 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:
resolvePathPartin interfaceSemanticPathPart
-
resolveIndexedAccess
default SqmPath<?> resolveIndexedAccess(SqmExpression<?> selector, boolean isTerminal, SqmCreationState creationState) - Specified by:
resolveIndexedAccessin interfaceSemanticPathPart
-
getResolvedModel
SqmPathSource<T> 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 ifincludeSubtypesis set totrueand this path is polymorphic, also try finding subtype attributes.- See Also:
-
copy
- Specified by:
copyin interfaceSqmExpression<T>- Specified by:
copyin interfaceSqmNode- Specified by:
copyin interfaceSqmSelectableNode<T>- Specified by:
copyin interfaceSqmTypedNode<T>