Class AbstractSqmPath<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>
- All Implemented Interfaces:
Expression<T>,Path<T>,Selection<T>,TupleElement<T>,Serializable,JpaCriteriaNode,JpaExpression<T>,JpaPath<T>,JpaSelection<T>,JpaTupleElement<T>,SemanticPathPart,SqmPath<T>,SqmExpression<T>,SqmSelectableNode<T>,SqmExpressibleAccessor<T>,SqmNode,SqmTypedNode<T>,SqmVisitableNode
- Direct Known Subclasses:
AbstractSqmFrom,AbstractSqmSimplePath,AbstractSqmSpecificPluralPartPath,AnyDiscriminatorSqmPath,EmbeddedDiscriminatorSqmPath,EntityDiscriminatorSqmPath,SqmFkExpression,SqmFunctionPath,SqmIndexedCollectionAccessPath
- Author:
- Steve Ebersole
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractSqmPath(NavigablePath navigablePath, SqmPathSource<T> referencedPathSource, SqmPath<?> lhs, NodeBuilder nodeBuilder) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcopyTo(AbstractSqmPath<T> target, SqmCopyContext context) get(MapAttribute<T, K, V> map) Create a path corresponding to the referenced map-valued attribute.<E,C extends Collection<E>>
SqmPath<C>get(PluralAttribute<T, C, E> attribute) Create a path corresponding to the referenced collection-valued attribute.<Y> SqmPath<Y>get(SingularAttribute<? super T, Y> jpaAttribute) Create a path corresponding to the referenced single-valued attribute.SqmPath<?>Create a path corresponding to the referenced attribute.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-joingetModel()Return the bindable object that corresponds to the path expression.Returns the NavigablePath.protected NavigablePathgetNavigablePathCopy(SqmPath<?> parent) Utility that checks if this path's parent navigable path is compatible with the specified SQM parent, and if not creates a copy of the navigable path with the correct parent.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. the concrete type for generic attributes.SqmPath<?>getReusablePath(String name) Returns an immutable List of reusable pathsprotected <S extends T>
SqmTreatedPath<T,S> getTreatedPath(ManagedDomainType<S> treatTarget) voidregisterReusablePath(SqmPath<?> path) Register a reusable path relative to this pathprotected <X> SqmPath<X>resolvePath(String attributeName, SqmPathSource<X> pathSource) protected <X> SqmPath<X>resolvePath(PersistentAttribute<?, X> attribute) voidsetExplicitAlias(String explicitAlias) Set the explicit alias for this pathtoString()SqmExpression<Class<? extends T>>type()Create an expression corresponding to the type of the path.voidvisitReusablePaths(Consumer<SqmPath<?>> consumer) Visit each reusable path relative to this pathMethods 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, nodeBuilderMethods inherited from class org.hibernate.query.sqm.tree.jpa.AbstractJpaSelection
alias, getSelectionItems, isCompoundSelectionMethods inherited from class org.hibernate.query.sqm.tree.jpa.AbstractJpaTupleElement
copyTo, getAlias, setAlias, setExpressibleTypeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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, visitSubSelectableNodesMethods inherited from interface org.hibernate.query.sqm.tree.SqmNode
asLoggableText, nodeBuilderMethods inherited from interface org.hibernate.query.sqm.tree.domain.SqmPath
applyInferableType, copy, findRoot, getJavaTypeDescriptor, resolveAlias, resolveIndexedAccess, resolvePathPart, treatAs, treatAsMethods inherited from interface org.hibernate.query.sqm.tree.select.SqmSelectableNode
getTupleLengthMethods inherited from interface org.hibernate.query.sqm.tree.SqmTypedNode
getNodeJavaTypeMethods inherited from interface org.hibernate.query.sqm.tree.SqmVisitableNode
accept, appendHqlString, toHqlStringMethods inherited from interface jakarta.persistence.TupleElement
getAlias
-
Constructor Details
-
Method Details
-
copyTo
-
getNodeType
Description copied from interface:SqmPathThis node's type is its "referenced path source"- Specified by:
getNodeTypein interfaceSqmExpression<T>- Specified by:
getNodeTypein interfaceSqmPath<T>- Specified by:
getNodeTypein interfaceSqmTypedNode<T>- Overrides:
getNodeTypein classAbstractJpaTupleElement<T>
-
getReferencedPathSource
Description copied from interface:SqmPathThe path source that this path refers to (and that most likely created it).- Specified by:
getReferencedPathSourcein interfaceSqmPath<T>- See Also:
-
getLhs
Description copied from interface:SqmPathGet the left-hand side of this path - may be null, indicating a root, cross-join or entity-join -
getReusablePaths
Description copied from interface:SqmPathReturns an immutable List of reusable paths- Specified by:
getReusablePathsin interfaceSqmPath<T>
-
visitReusablePaths
Description copied from interface:SqmPathVisit each reusable path relative to this path- Specified by:
visitReusablePathsin interfaceSqmPath<T>
-
registerReusablePath
Description copied from interface:SqmPathRegister a reusable path relative to this path- Specified by:
registerReusablePathin interfaceSqmPath<T>
-
getReusablePath
- Specified by:
getReusablePathin interfaceSqmPath<T>
-
getExplicitAlias
Description copied from interface:SqmPathRetrieve the explicit alias, if one. May return null- Specified by:
getExplicitAliasin interfaceSqmPath<T>
-
setExplicitAlias
Description copied from interface:SqmPathSet the explicit alias for this path- Specified by:
setExplicitAliasin interfaceSqmPath<T>
-
getModel
Description copied from interface:PathReturn the bindable object that corresponds to the path expression. -
getResolvedModel
Description copied from interface:SqmPathGet this path's actual resolved model, i.e. the concrete type for generic attributes.- Specified by:
getResolvedModelin interfaceSqmPath<T>
-
getExpressible
- Specified by:
getExpressiblein interfaceSqmExpressibleAccessor<T>- Specified by:
getExpressiblein interfaceSqmTypedNode<T>
-
type
Description copied from interface:PathCreate an expression corresponding to the type of the path. -
get
Description copied from interface:PathCreate a path corresponding to the referenced attribute.Note: Applications using the string-based API may need to specify the type resulting from the
getoperation in order to avoid the use ofPathvariables.For example: CriteriaQuery<Person> q = cb.createQuery(Person.class); Root<Person> p = q.from(Person.class); q.select(p) .where(cb.isMember("joe", p.<Set<String>>get("nicknames"))); rather than: CriteriaQuery<Person> q = cb.createQuery(Person.class); Root<Person> p = q.from(Person.class); Path<Set<String>> nicknames = p.get("nicknames"); q.select(p) .where(cb.isMember("joe", nicknames)); -
resolvePath
-
resolvePath
-
getTreatedPath
-
get
Description copied from interface:PathCreate a path corresponding to the referenced single-valued attribute. -
get
Description copied from interface:PathCreate a path corresponding to the referenced collection-valued attribute. -
get
Description copied from interface:PathCreate a path corresponding to the referenced map-valued attribute. -
toString
-