Class SqmPolymorphicRootDescriptor<T>
- java.lang.Object
-
- org.hibernate.query.sqm.tree.domain.SqmPolymorphicRootDescriptor<T>
-
- All Implemented Interfaces:
Bindable<T>
,EntityType<T>
,IdentifiableType<T>
,ManagedType<T>
,Type<T>
,DomainType<T>
,EntityDomainType<T>
,IdentifiableDomainType<T>
,ManagedDomainType<T>
,BindableType<T>
,SqmExpressible<T>
,SqmPathSource<T>
,SqmExpressibleAccessor<T>
public class SqmPolymorphicRootDescriptor<T> extends Object implements EntityDomainType<T>
Acts as the EntityValuedNavigable for a "polymorphic query" grouping
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jakarta.persistence.metamodel.Bindable
Bindable.BindableType
-
Nested classes/interfaces inherited from interface jakarta.persistence.metamodel.Type
Type.PersistenceType
-
-
Constructor Summary
Constructors Constructor Description SqmPolymorphicRootDescriptor(JavaType<T> polymorphicJavaType, Set<EntityDomainType<?>> implementors)
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.query.sqm.SqmExpressible
getRelationalJavaType, isInstance, resolveExpressible
-
Methods inherited from interface org.hibernate.query.sqm.tree.SqmExpressibleAccessor
getNodeJavaType
-
Methods inherited from interface org.hibernate.query.sqm.SqmPathSource
getExpressible, getIntermediatePathSource, getSubPathSource, isGeneric
-
-
-
-
Constructor Detail
-
SqmPolymorphicRootDescriptor
public SqmPolymorphicRootDescriptor(JavaType<T> polymorphicJavaType, Set<EntityDomainType<?>> implementors)
-
-
Method Detail
-
getImplementors
public Set<EntityDomainType<?>> getImplementors()
-
getName
public String getName()
- Specified by:
getName
in interfaceEntityType<T>
-
getHibernateEntityName
public String getHibernateEntityName()
- Specified by:
getHibernateEntityName
in interfaceEntityDomainType<T>
-
getTypeName
public String getTypeName()
Description copied from interface:ManagedDomainType
Get the type name. Generally speaking, this returns the name of the Java class. However, for dynamic models (RepresentationMode.MAP
), this returns the symbolic name since the Java type isMap
- Specified by:
getTypeName
in interfaceDomainType<T>
- Specified by:
getTypeName
in interfaceManagedDomainType<T>
- Returns:
- The type name.
- See Also:
ManagedDomainType.getRepresentationMode()
-
getPathName
public String getPathName()
Description copied from interface:SqmPathSource
The name of this thing. Mainly used in logging and when creating aNavigablePath
- Specified by:
getPathName
in interfaceSqmPathSource<T>
-
getSqmPathType
public DomainType<?> getSqmPathType()
Description copied from interface:SqmPathSource
The type of SqmPaths this source creates. Corollary to JPA'sBindable.getBindableJavaType()
- Specified by:
getSqmPathType
in interfaceSqmPathSource<T>
-
getBindableType
public Bindable.BindableType getBindableType()
- Specified by:
getBindableType
in interfaceBindable<T>
-
getBindableJavaType
public Class<T> getBindableJavaType()
Description copied from interface:BindableType
The expected Java type- Specified by:
getBindableJavaType
in interfaceBindable<T>
- Specified by:
getBindableJavaType
in interfaceBindableType<T>
-
getPersistenceType
public Type.PersistenceType getPersistenceType()
- Specified by:
getPersistenceType
in interfaceType<T>
-
getJavaType
public Class<T> getJavaType()
- Specified by:
getJavaType
in interfaceType<T>
-
getExpressibleJavaType
public JavaType<T> getExpressibleJavaType()
Description copied from interface:SqmExpressible
The Java type descriptor for this expressible- Specified by:
getExpressibleJavaType
in interfaceDomainType<T>
- Specified by:
getExpressibleJavaType
in interfaceSqmExpressible<T>
- See Also:
DomainType.getTypeName()
-
findAttribute
public PersistentAttribute findAttribute(String name)
- Specified by:
findAttribute
in interfaceManagedDomainType<T>
-
findSubTypesAttribute
public PersistentAttribute findSubTypesAttribute(String name)
- Specified by:
findSubTypesAttribute
in interfaceManagedDomainType<T>
-
findAttributeInSuperTypes
public PersistentAttribute<? super T,?> findAttributeInSuperTypes(String name)
- Specified by:
findAttributeInSuperTypes
in interfaceManagedDomainType<T>
-
visitAttributes
public void visitAttributes(Consumer<? super PersistentAttribute<T,?>> action)
- Specified by:
visitAttributes
in interfaceManagedDomainType<T>
-
visitDeclaredAttributes
public void visitDeclaredAttributes(Consumer<? super PersistentAttribute<T,?>> action)
- Specified by:
visitDeclaredAttributes
in interfaceManagedDomainType<T>
-
getAttribute
public PersistentAttribute<? super T,?> getAttribute(String name)
- Specified by:
getAttribute
in interfaceManagedDomainType<T>
- Specified by:
getAttribute
in interfaceManagedType<T>
-
getDeclaredAttribute
public PersistentAttribute<T,?> getDeclaredAttribute(String name)
- Specified by:
getDeclaredAttribute
in interfaceManagedDomainType<T>
- Specified by:
getDeclaredAttribute
in interfaceManagedType<T>
-
findSingularAttribute
public SingularPersistentAttribute<? super T,?> findSingularAttribute(String name)
- Specified by:
findSingularAttribute
in interfaceManagedDomainType<T>
-
findPluralAttribute
public PluralPersistentAttribute<? super T,?,?> findPluralAttribute(String name)
- Specified by:
findPluralAttribute
in interfaceManagedDomainType<T>
-
findConcreteGenericAttribute
public PersistentAttribute<? super T,?> findConcreteGenericAttribute(String name)
- Specified by:
findConcreteGenericAttribute
in interfaceManagedDomainType<T>
-
findDeclaredAttribute
public PersistentAttribute<T,?> findDeclaredAttribute(String name)
- Specified by:
findDeclaredAttribute
in interfaceManagedDomainType<T>
-
findDeclaredSingularAttribute
public SingularPersistentAttribute<? super T,?> findDeclaredSingularAttribute(String name)
- Specified by:
findDeclaredSingularAttribute
in interfaceManagedDomainType<T>
-
findDeclaredPluralAttribute
public PluralPersistentAttribute<? super T,?,?> findDeclaredPluralAttribute(String name)
- Specified by:
findDeclaredPluralAttribute
in interfaceManagedDomainType<T>
-
findDeclaredConcreteGenericAttribute
public PersistentAttribute<? super T,?> findDeclaredConcreteGenericAttribute(String name)
- Specified by:
findDeclaredConcreteGenericAttribute
in interfaceManagedDomainType<T>
-
getAttributes
public Set<Attribute<? super T,?>> getAttributes()
- Specified by:
getAttributes
in interfaceManagedType<T>
-
getDeclaredAttributes
public Set<Attribute<T,?>> getDeclaredAttributes()
- Specified by:
getDeclaredAttributes
in interfaceManagedType<T>
-
getSingularAttribute
public <Y> SingularAttribute<? super T,Y> getSingularAttribute(String name, Class<Y> type)
- Specified by:
getSingularAttribute
in interfaceManagedType<T>
-
getDeclaredSingularAttribute
public <Y> SingularAttribute<T,Y> getDeclaredSingularAttribute(String name, Class<Y> type)
- Specified by:
getDeclaredSingularAttribute
in interfaceManagedType<T>
-
getSingularAttributes
public Set<SingularAttribute<? super T,?>> getSingularAttributes()
- Specified by:
getSingularAttributes
in interfaceManagedType<T>
-
getDeclaredSingularAttributes
public Set<SingularAttribute<T,?>> getDeclaredSingularAttributes()
- Specified by:
getDeclaredSingularAttributes
in interfaceManagedType<T>
-
getCollection
public <E> CollectionAttribute<? super T,E> getCollection(String name, Class<E> elementType)
- Specified by:
getCollection
in interfaceManagedType<T>
-
getDeclaredCollection
public <E> CollectionAttribute<T,E> getDeclaredCollection(String name, Class<E> elementType)
- Specified by:
getDeclaredCollection
in interfaceManagedType<T>
-
getSet
public <E> SetAttribute<? super T,E> getSet(String name, Class<E> elementType)
- Specified by:
getSet
in interfaceManagedType<T>
-
getDeclaredSet
public <E> SetAttribute<T,E> getDeclaredSet(String name, Class<E> elementType)
- Specified by:
getDeclaredSet
in interfaceManagedType<T>
-
getList
public <E> ListAttribute<? super T,E> getList(String name, Class<E> elementType)
- Specified by:
getList
in interfaceManagedType<T>
-
getDeclaredList
public <E> ListAttribute<T,E> getDeclaredList(String name, Class<E> elementType)
- Specified by:
getDeclaredList
in interfaceManagedType<T>
-
getMap
public <K,V> MapAttribute<? super T,K,V> getMap(String name, Class<K> keyType, Class<V> valueType)
- Specified by:
getMap
in interfaceManagedType<T>
-
getDeclaredMap
public <K,V> MapAttribute<T,K,V> getDeclaredMap(String name, Class<K> keyType, Class<V> valueType)
- Specified by:
getDeclaredMap
in interfaceManagedType<T>
-
getPluralAttributes
public Set<PluralAttribute<? super T,?,?>> getPluralAttributes()
- Specified by:
getPluralAttributes
in interfaceManagedType<T>
-
getDeclaredPluralAttributes
public Set<PluralAttribute<T,?,?>> getDeclaredPluralAttributes()
- Specified by:
getDeclaredPluralAttributes
in interfaceManagedType<T>
-
getSingularAttribute
public SingularAttribute<? super T,?> getSingularAttribute(String name)
- Specified by:
getSingularAttribute
in interfaceManagedType<T>
-
getDeclaredSingularAttribute
public SingularAttribute<T,?> getDeclaredSingularAttribute(String name)
- Specified by:
getDeclaredSingularAttribute
in interfaceManagedType<T>
-
getCollection
public CollectionAttribute<? super T,?> getCollection(String name)
- Specified by:
getCollection
in interfaceManagedType<T>
-
getDeclaredCollection
public CollectionAttribute<T,?> getDeclaredCollection(String name)
- Specified by:
getDeclaredCollection
in interfaceManagedType<T>
-
getSet
public SetAttribute<? super T,?> getSet(String name)
- Specified by:
getSet
in interfaceManagedType<T>
-
getDeclaredSet
public SetAttribute<T,?> getDeclaredSet(String name)
- Specified by:
getDeclaredSet
in interfaceManagedType<T>
-
getList
public ListAttribute<? super T,?> getList(String name)
- Specified by:
getList
in interfaceManagedType<T>
-
getDeclaredList
public ListAttribute<T,?> getDeclaredList(String name)
- Specified by:
getDeclaredList
in interfaceManagedType<T>
-
getMap
public MapAttribute<? super T,?,?> getMap(String name)
- Specified by:
getMap
in interfaceManagedType<T>
-
getDeclaredMap
public MapAttribute<T,?,?> getDeclaredMap(String name)
- Specified by:
getDeclaredMap
in interfaceManagedType<T>
-
findSubPathSource
public SqmPathSource<?> findSubPathSource(String name)
Description copied from interface:SqmPathSource
Find a SqmPathSource by name relative to this source. returns null if the subPathSource is not found- Specified by:
findSubPathSource
in interfaceSqmPathSource<T>
-
createSqmPath
public SqmPath<T> createSqmPath(SqmPath<?> lhs, SqmPathSource<?> intermediatePathSource)
Description copied from interface:SqmPathSource
Create an SQM path for this source relative to the given left-hand side- Specified by:
createSqmPath
in interfaceSqmPathSource<T>
-
getRepresentationMode
public RepresentationMode getRepresentationMode()
- Specified by:
getRepresentationMode
in interfaceManagedDomainType<T>
-
makeSubGraph
public SubGraphImplementor<T> makeSubGraph()
- Specified by:
makeSubGraph
in interfaceManagedDomainType<T>
-
makeSubGraph
public <S extends T> SubGraphImplementor<S> makeSubGraph(Class<S> subType)
- Specified by:
makeSubGraph
in interfaceManagedDomainType<T>
-
findSubType
public <S extends T> ManagedDomainType<S> findSubType(String subTypeName)
- Specified by:
findSubType
in interfaceManagedDomainType<T>
-
findSubType
public <S extends T> ManagedDomainType<S> findSubType(Class<S> type)
- Specified by:
findSubType
in interfaceManagedDomainType<T>
-
getIdentifierDescriptor
public SqmPathSource<?> getIdentifierDescriptor()
- Specified by:
getIdentifierDescriptor
in interfaceIdentifiableDomainType<T>
-
getId
public <Y> SingularPersistentAttribute<? super T,Y> getId(Class<Y> type)
- Specified by:
getId
in interfaceIdentifiableDomainType<T>
- Specified by:
getId
in interfaceIdentifiableType<T>
-
getDeclaredId
public <Y> SingularPersistentAttribute<T,Y> getDeclaredId(Class<Y> type)
- Specified by:
getDeclaredId
in interfaceIdentifiableDomainType<T>
- Specified by:
getDeclaredId
in interfaceIdentifiableType<T>
-
getVersion
public <Y> SingularPersistentAttribute<? super T,Y> getVersion(Class<Y> type)
- Specified by:
getVersion
in interfaceIdentifiableDomainType<T>
- Specified by:
getVersion
in interfaceIdentifiableType<T>
-
getDeclaredVersion
public <Y> SingularPersistentAttribute<T,Y> getDeclaredVersion(Class<Y> type)
- Specified by:
getDeclaredVersion
in interfaceIdentifiableDomainType<T>
- Specified by:
getDeclaredVersion
in interfaceIdentifiableType<T>
-
getIdClassAttributes
public Set<SingularAttribute<? super T,?>> getIdClassAttributes()
- Specified by:
getIdClassAttributes
in interfaceIdentifiableDomainType<T>
- Specified by:
getIdClassAttributes
in interfaceIdentifiableType<T>
-
getIdType
public SimpleDomainType<?> getIdType()
- Specified by:
getIdType
in interfaceIdentifiableDomainType<T>
- Specified by:
getIdType
in interfaceIdentifiableType<T>
-
getSupertype
public IdentifiableDomainType<? super T> getSupertype()
- Specified by:
getSupertype
in interfaceIdentifiableDomainType<T>
- Specified by:
getSupertype
in interfaceIdentifiableType<T>
-
hasIdClass
public boolean hasIdClass()
- Specified by:
hasIdClass
in interfaceIdentifiableDomainType<T>
-
findIdAttribute
public SingularPersistentAttribute<T,?> findIdAttribute()
- Specified by:
findIdAttribute
in interfaceIdentifiableDomainType<T>
-
visitIdClassAttributes
public void visitIdClassAttributes(Consumer<SingularPersistentAttribute<? super T,?>> action)
- Specified by:
visitIdClassAttributes
in interfaceIdentifiableDomainType<T>
-
findVersionAttribute
public SingularPersistentAttribute<? super T,?> findVersionAttribute()
- Specified by:
findVersionAttribute
in interfaceIdentifiableDomainType<T>
-
findNaturalIdAttributes
public List<? extends SingularPersistentAttribute<? super T,?>> findNaturalIdAttributes()
- Specified by:
findNaturalIdAttributes
in interfaceIdentifiableDomainType<T>
-
hasSingleIdAttribute
public boolean hasSingleIdAttribute()
- Specified by:
hasSingleIdAttribute
in interfaceIdentifiableType<T>
-
hasVersionAttribute
public boolean hasVersionAttribute()
- Specified by:
hasVersionAttribute
in interfaceIdentifiableType<T>
-
getSuperType
public ManagedDomainType<? super T> getSuperType()
Description copied from interface:ManagedDomainType
This type's super type descriptor. Note : we define this on the managed type descriptor in anticipation of supporting embeddable inheritance- Specified by:
getSuperType
in interfaceManagedDomainType<T>
-
getSubTypes
public Collection<? extends EntityDomainType<? extends T>> getSubTypes()
- Specified by:
getSubTypes
in interfaceEntityDomainType<T>
- Specified by:
getSubTypes
in interfaceManagedDomainType<T>
-
addSubType
public void addSubType(ManagedDomainType subType)
- Specified by:
addSubType
in interfaceManagedDomainType<T>
-
-