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
public abstract class AbstractSqmPath<T> extends AbstractSqmExpression<T> implements SqmPath<T>
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractSqmPath(NavigablePath navigablePath, SqmPathSource<T> referencedPathSource, SqmPath<?> lhs, NodeBuilder nodeBuilder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcopyTo(AbstractSqmPath<T> target, SqmCopyContext context)<K,V,M extends Map<K,V>>
SqmPath<M>get(MapAttribute<T,K,V> map)<E,C extends Collection<E>>
SqmPath<C>get(PluralAttribute<T,C,E> attribute)<Y> SqmPath<Y>get(SingularAttribute<? super T,Y> jpaAttribute)SqmPath<?>get(String attributeName)StringgetExplicitAlias()Retrieve the explicit alias, if one.SqmExpressible<T>getExpressible()SqmPath<?>getLhs()Get the left-hand side of this path - may be null, indicating a root, cross-join or entity-joinSqmPathSource<T>getModel()NavigablePathgetNavigablePath()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.SqmPathSource<T>getNodeType()This node's type is its "referenced path source"SqmPathSource<T>getReferencedPathSource()The path source that this path refers to (and that most likely created it).SqmPathSource<?>getResolvedModel()Get this path's actual resolved model, i.e.SqmPath<?>getReusablePath(String name)List<SqmPath<?>>getReusablePaths()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 pathStringtoString()SqmExpression<Class<? extends T>>type()voidvisitReusablePaths(Consumer<SqmPath<?>> consumer)Visit each reusable path relative to this path-
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
alias, 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 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.SqmNode
asLoggableText, nodeBuilder
-
Methods inherited from interface org.hibernate.query.sqm.tree.domain.SqmPath
applyInferableType, copy, findRoot, getJavaTypeDescriptor, resolveAlias, resolveIndexedAccess, resolvePathPart, treatAs, treatAs
-
Methods inherited from interface org.hibernate.query.sqm.tree.select.SqmSelectableNode
getTupleLength
-
Methods inherited from interface org.hibernate.query.sqm.tree.SqmTypedNode
getNodeJavaType
-
Methods inherited from interface org.hibernate.query.sqm.tree.SqmVisitableNode
accept, appendHqlString, toHqlString
-
Methods inherited from interface jakarta.persistence.TupleElement
getAlias
-
-
-
-
Constructor Detail
-
AbstractSqmPath
protected AbstractSqmPath(NavigablePath navigablePath, SqmPathSource<T> referencedPathSource, SqmPath<?> lhs, NodeBuilder nodeBuilder)
-
-
Method Detail
-
copyTo
protected void copyTo(AbstractSqmPath<T> target, SqmCopyContext context)
-
getNodeType
public SqmPathSource<T> 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
public SqmPathSource<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:
SqmPathSource.createSqmPath(org.hibernate.query.sqm.tree.domain.SqmPath<?>, org.hibernate.query.sqm.SqmPathSource<?>)
-
getNavigablePath
public NavigablePath getNavigablePath()
Description copied from interface:SqmPathReturns the NavigablePath.- Specified by:
getNavigablePathin interfaceJpaPath<T>- Specified by:
getNavigablePathin interfaceSqmPath<T>
-
getLhs
public SqmPath<?> 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
public List<SqmPath<?>> getReusablePaths()
Description copied from interface:SqmPathReturns an immutable List of reusable paths- Specified by:
getReusablePathsin interfaceSqmPath<T>
-
visitReusablePaths
public void visitReusablePaths(Consumer<SqmPath<?>> consumer)
Description copied from interface:SqmPathVisit each reusable path relative to this path- Specified by:
visitReusablePathsin interfaceSqmPath<T>
-
registerReusablePath
public void registerReusablePath(SqmPath<?> path)
Description copied from interface:SqmPathRegister a reusable path relative to this path- Specified by:
registerReusablePathin interfaceSqmPath<T>
-
getReusablePath
public SqmPath<?> getReusablePath(String name)
- Specified by:
getReusablePathin interfaceSqmPath<T>
-
getExplicitAlias
public String getExplicitAlias()
Description copied from interface:SqmPathRetrieve the explicit alias, if one. May return null- Specified by:
getExplicitAliasin interfaceSqmPath<T>
-
setExplicitAlias
public void setExplicitAlias(String explicitAlias)
Description copied from interface:SqmPathSet the explicit alias for this path- Specified by:
setExplicitAliasin interfaceSqmPath<T>
-
getModel
public SqmPathSource<T> getModel()
-
getResolvedModel
public SqmPathSource<?> 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
public SqmExpressible<T> getExpressible()
- Specified by:
getExpressiblein interfaceSqmExpressibleAccessor<T>- Specified by:
getExpressiblein interfaceSqmTypedNode<T>
-
type
public SqmExpression<Class<? extends T>> type()
-
resolvePath
protected <X> SqmPath<X> resolvePath(PersistentAttribute<?,X> attribute)
-
resolvePath
protected <X> SqmPath<X> resolvePath(String attributeName, SqmPathSource<X> pathSource)
-
getTreatedPath
protected <S extends T> SqmTreatedPath<T,S> getTreatedPath(ManagedDomainType<S> treatTarget)
-
getNavigablePathCopy
protected NavigablePath getNavigablePathCopy(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.
-
get
public <Y> SqmPath<Y> get(SingularAttribute<? super T,Y> jpaAttribute)
-
get
public <E,C extends Collection<E>> SqmPath<C> get(PluralAttribute<T,C,E> attribute)
-
get
public <K,V,M extends Map<K,V>> SqmPath<M> get(MapAttribute<T,K,V> map)
-
-