Package org.hibernate.query.sqm
Interface SqmPathSource<J>
- All Superinterfaces:
Bindable<J>
,BindableType<J>
,SqmExpressible<J>
,SqmExpressibleAccessor<J>
- All Known Subinterfaces:
BagPersistentAttribute<D,
,E> CompositeSqmPathSource<J>
,EmbeddableDomainType<J>
,EmbeddedDomainType<J>
,EntityDomainType<J>
,ListPersistentAttribute<D,
,E> MappedSuperclassDomainType<J>
,MapPersistentAttribute<D,
,K, V> PluralPersistentAttribute<D,
,C, E> SetPersistentAttribute<D,
,E> SingularPersistentAttribute<D,
,J> TreatableDomainType<J>
- All Known Implementing Classes:
AbstractDiscriminatorSqmPathSource
,AbstractPluralAttribute
,AbstractSqmPathSource
,AnonymousTupleSimpleSqmPathSource
,AnonymousTupleSqmAssociationPathSource
,AnonymousTupleSqmAssociationPathSourceNew
,AnonymousTupleSqmPathSource
,AnonymousTupleSqmPathSourceNew
,AnonymousTupleType
,AnyDiscriminatorSqmPathSource
,AnyMappingSqmPathSource
,BagAttributeImpl
,BasicSqmPathSource
,EmbeddableTypeImpl
,EmbeddedDiscriminatorSqmPathSource
,EmbeddedSqmPathSource
,EntityDiscriminatorSqmPathSource
,EntitySqmPathSource
,EntityTypeImpl
,ListAttributeImpl
,MapAttributeImpl
,MappedSuperclassSqmPathSource
,MappedSuperclassTypeImpl
,NonAggregatedCompositeSqmPathSource
,SetAttributeImpl
,SingularAttributeImpl
,SingularAttributeImpl.Identifier
,SingularAttributeImpl.Version
,SqmCteTable
,SqmPolymorphicRootDescriptor
Represents any part of the domain model which can be used to create a
SqmPath
node.- API Note:
- Parallel to the JPA-defined interface
Bindable
but broader mainly to support@Any
mappings
-
Nested Class Summary
Nested classes/interfaces inherited from interface jakarta.persistence.metamodel.Bindable
Bindable.BindableType
-
Method Summary
Modifier and TypeMethodDescriptioncreateSqmPath
(SqmPath<?> lhs, SqmPathSource<?> intermediatePathSource) Create an SQM path for this source relative to the given left hand sidefindSubPathSource
(String name) Find aSqmPathSource
by name relative to this source.default SqmPathSource<?>
findSubPathSource
(String name, boolean includeSubtypes) Find aSqmPathSource
by name relative to this source.default SqmPathSource<?>
findSubPathSource
(String name, JpaMetamodel metamodel) Deprecated, for removal: This API element is subject to removal in a future version.default SqmExpressible<J>
default SqmPathSource<?>
getIntermediatePathSource
(SqmPathSource<?> pathSource) Returns the intermediateSqmPathSource
for a path source previously acquired viafindSubPathSource(String)
.The name of this thing.The type of path this source creates.default DomainType<J>
default SqmPathSource<?>
getSubPathSource
(String name) Find aSqmPathSource
by name relative to this source.default SqmPathSource<?>
getSubPathSource
(String name, boolean subtypes) Find aSqmPathSource
by name relative to this source.default SqmPathSource<?>
getSubPathSource
(String name, JpaMetamodel metamodel) Deprecated, for removal: This API element is subject to removal in a future version.Use #getSubPathSource(String, boolean)
insteaddefault boolean
Indicates if this path source is generically typedMethods inherited from interface jakarta.persistence.metamodel.Bindable
getBindableJavaType, getBindableType
Methods inherited from interface org.hibernate.query.BindableType
getBindableJavaType
Methods inherited from interface org.hibernate.query.sqm.SqmExpressible
getExpressibleJavaType, getRelationalJavaType, getTypeName, isInstance, resolveExpressible
Methods inherited from interface org.hibernate.query.sqm.tree.SqmExpressibleAccessor
getNodeJavaType
-
Method Details
-
getPathName
String getPathName()The name of this thing.- API Note:
- Mainly used in logging and when creating a
NavigablePath
.
-
getSqmPathType
DomainType<J> getSqmPathType()The type of path this source creates.- API Note:
- Analogous to
Bindable.getBindableJavaType()
.
-
findSubPathSource
Find aSqmPathSource
by name relative to this source.- Parameters:
name
- the name of the path source to find- Returns:
- null if the subPathSource is not found
- Throws:
IllegalStateException
- to indicate that this source cannot be de-referenced
-
findSubPathSource
@Deprecated(forRemoval=true, since="7.0") default SqmPathSource<?> findSubPathSource(String name, JpaMetamodel metamodel) Deprecated, for removal: This API element is subject to removal in a future version.UsefindSubPathSource(String, boolean)
insteadFind aSqmPathSource
by name relative to this source.- Returns:
- null if the subPathSource is not found
- Throws:
IllegalStateException
- to indicate that this source cannot be de-referenced
-
findSubPathSource
Find aSqmPathSource
by name relative to this source. IfincludeSubtypes
is set totrue
and this path source is polymorphic, also try finding subtype attributes.- Parameters:
name
- the name of the path source to findincludeSubtypes
- flag indicating whether to consider subtype attributes- Returns:
- null if the subPathSource is not found
- Throws:
IllegalStateException
- to indicate that this source cannot be de-referenced
-
getSubPathSource
Find aSqmPathSource
by name relative to this source.- Parameters:
name
- the name of the path source to find- Throws:
IllegalStateException
- to indicate that this source cannot be de-referencedIllegalArgumentException
- if the subPathSource is not found
-
getSubPathSource
@Deprecated(forRemoval=true, since="7.0") default SqmPathSource<?> getSubPathSource(String name, JpaMetamodel metamodel) Deprecated, for removal: This API element is subject to removal in a future version.Use #getSubPathSource(String, boolean)
insteadFind aSqmPathSource
by name relative to this source and all its subtypes.- Throws:
IllegalStateException
- to indicate that this source cannot be de-referencedIllegalArgumentException
- if the subPathSource is not found
-
getSubPathSource
Find aSqmPathSource
by name relative to this source. Ifsubtypes
is set totrue
and this path source is polymorphic, also try finding subtype attributes.- Parameters:
name
- the name of the path source to findsubtypes
- flag indicating whether to consider subtype attributes- Throws:
IllegalStateException
- to indicate that this source cannot be de-referencedIllegalArgumentException
- if the subPathSource is not found
-
getIntermediatePathSource
Returns the intermediateSqmPathSource
for a path source previously acquired viafindSubPathSource(String)
. -
createSqmPath
Create an SQM path for this source relative to the given left hand side -
getExpressible
- Specified by:
getExpressible
in interfaceSqmExpressibleAccessor<J>
-
getSqmType
- Specified by:
getSqmType
in interfaceSqmExpressible<J>
-
isGeneric
default boolean isGeneric()Indicates if this path source is generically typed
-
findSubPathSource(String, boolean)
instead