Interface PathSource<J>
- Type Parameters:
J- The type of path element this source creates.
- All Known Subinterfaces:
BagPersistentAttribute<D,E>, EmbeddableDomainType<J>, EntityDomainType<J>, ListPersistentAttribute<D, E>, MappedSuperclassDomainType<J>, MapPersistentAttribute<D, K, V>, PluralPersistentAttribute<D, C, E>, SetPersistentAttribute<D, E>, SingularPersistentAttribute<D, J>, SqmBagPersistentAttribute<D, E>, SqmEmbeddableDomainType<E>, SqmEntityDomainType<E>, SqmListPersistentAttribute<D, E>, SqmMappedSuperclassDomainType<T>, SqmMapPersistentAttribute<D, K, V>, SqmPathSource<J>, SqmPluralPersistentAttribute<D, C, E>, SqmSetPersistentAttribute<D, E>, SqmSingularPersistentAttribute<D, J>, SqmTreatableDomainType<T>, TreatableDomainType<J>
- All Known Implementing Classes:
org.hibernate.query.sqm.tuple.internal.AnonymousTupleType, SqmCteTable, SqmPolymorphicRootDescriptor
public interface PathSource<J>
Any element of the domain model which can be used to create an
element of a path expression in a query.
- Since:
- 7.0
-
Method Summary
Modifier and TypeMethodDescription@Nullable PathSource<?> findSubPathSource(String name) Find aPathSourceby name relative to this source.@Nullable PathSource<?> findSubPathSource(String name, boolean includeSubtypes) Find aPathSourceby name relative to this source.The name of this thing.The type of path this source creates.
-
Method Details
-
getPathName
String getPathName()The name of this thing.- API Note:
- Mainly used in logging and when creating a
NavigablePath.
-
getPathType
DomainType<J> getPathType()The type of path this source creates. -
findSubPathSource
Find aPathSourceby 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
Find aPathSourceby name relative to this source. IfincludeSubtypesis set totrueand 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
-