Top Description Methods
org.hibernate.query.sqm

public Interface SqmPathSource<J>

extends SqmExpressible<J>, Bindable<J>, SqmExpressibleAccessor<J>
Known Direct Subinterfaces
org.hibernate.metamodel.model.domain.EntityDomainType, org.hibernate.metamodel.model.domain.MappedSuperclassDomainType, org.hibernate.metamodel.model.domain.PluralPersistentAttribute, org.hibernate.metamodel.model.domain.SingularPersistentAttribute, org.hibernate.metamodel.model.domain.internal.CompositeSqmPathSource
Known Direct Implementers
org.hibernate.metamodel.model.domain.internal.AbstractSqmPathSource, org.hibernate.query.derived.AnonymousTupleSimpleSqmPathSource, org.hibernate.query.derived.AnonymousTupleSqmPathSource, org.hibernate.query.derived.AnonymousTupleType
Imports
java.util.Locale, jakarta.persistence.metamodel.Bindable, org.hibernate.metamodel.model.domain.DomainType, org.hibernate.metamodel.model.domain.spi.JpaMetamodelImplementor, org.hibernate.spi.NavigablePath, org.hibernate.query.sqm.tree.SqmExpressibleAccessor, org.hibernate.query.sqm.tree.domain.SqmPath

Represents any part of the domain model which can be used to create a SqmPath node.

API Note

Parallel to the JPA-defined interface jakarta.persistence.metamodel.Bindable but broader mainly to support @Any mappings

Author
Steve Ebersole

Method Summary

Modifier and TypeMethod and Description
public SqmPath<J>
createSqmPath(SqmPath<?> lhs, SqmPathSource<?> intermediatePathSource)

Create an SQM path for this source relative to the given left hand side

public SqmPathSource<?>

Returns:

null if the subPathSource is not found
findSubPathSource
(String name)

Find a SqmPathSource by name relative to this source.

public default SqmPathSource<?>

Returns:

null if the subPathSource is not found
findSubPathSource
(String name, JpaMetamodelImplementor metamodel)

Find a SqmPathSource by name relative to this source.

public default SqmExpressible<J>
public default SqmPathSource<?>
getIntermediatePathSource(SqmPathSource<?> pathSource)

Returns the intermediate SqmPathSource for a path source previously acquired via findSubPathSource(String).

public String
getPathName()

The name of this thing.

public DomainType<J>
getSqmPathType()

The type of path this source creates.

public default DomainType<J>
public default SqmPathSource<?>
getSubPathSource(String name)

Find a SqmPathSource by name relative to this source.

public default SqmPathSource<?>
getSubPathSource(String name, JpaMetamodelImplementor metamodel)

Find a SqmPathSource by name relative to this source.

public default boolean
isGeneric()

Indicates if this path source is generically typed

Inherited from jakarta.persistence.metamodel.Bindable:
getBindableJavaTypegetBindableType
Inherited from org.hibernate.query.sqm.SqmExpressible:
getExpressibleJavaTypegetRelationalJavaTypegetTypeNameisInstanceresolveExpressible
Inherited from org.hibernate.query.sqm.tree.SqmExpressibleAccessor:
getNodeJavaType

Method Detail

createSqmPathback to summary
public SqmPath<J> createSqmPath(SqmPath<?> lhs, SqmPathSource<?> intermediatePathSource)

Create an SQM path for this source relative to the given left hand side

findSubPathSourceback to summary
public SqmPathSource<?> findSubPathSource(String name)

Find a SqmPathSource by name relative to this source.

Returns:SqmPathSource<?>

null if the subPathSource is not found

Exceptions
IllegalStateException:
to indicate that this source cannot be de-referenced
findSubPathSourceback to summary
public default SqmPathSource<?> findSubPathSource(String name, JpaMetamodelImplementor metamodel)

Find a SqmPathSource by name relative to this source.

Returns:SqmPathSource<?>

null if the subPathSource is not found

Exceptions
IllegalStateException:
to indicate that this source cannot be de-referenced
getExpressibleback to summary
public default SqmExpressible<J> getExpressible()

Implements org.hibernate.query.sqm.tree.SqmExpressibleAccessor.getExpressible.

Annotations
@Override
getIntermediatePathSourceback to summary
public default SqmPathSource<?> getIntermediatePathSource(SqmPathSource<?> pathSource)

Returns the intermediate SqmPathSource for a path source previously acquired via findSubPathSource(String).

getPathNameback to summary
public String getPathName()

The name of this thing.

API Note

Mainly used in logging and when creating a NavigablePath.

getSqmPathTypeback to summary
public DomainType<J> getSqmPathType()

The type of path this source creates.

API Note

Analogous to Bindable#getBindableJavaType().

getSqmTypeback to summary
public default DomainType<J> getSqmType()

Implements org.hibernate.query.sqm.SqmExpressible.getSqmType.

Annotations
@Override
getSubPathSourceback to summary
public default SqmPathSource<?> getSubPathSource(String name)

Find a SqmPathSource by name relative to this source.

Exceptions
IllegalStateException:
to indicate that this source cannot be de-referenced
IllegalArgumentException:
if the subPathSource is not found
getSubPathSourceback to summary
public default SqmPathSource<?> getSubPathSource(String name, JpaMetamodelImplementor metamodel)

Find a SqmPathSource by name relative to this source.

Exceptions
IllegalStateException:
to indicate that this source cannot be de-referenced
IllegalArgumentException:
if the subPathSource is not found
isGenericback to summary
public default boolean isGeneric()

Indicates if this path source is generically typed