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>,TreatableDomainType<T>,BindableType<T>,SqmExpressible<T>,SqmPathSource<T>,SqmExpressibleAccessor<T>
public class SqmPolymorphicRootDescriptor<T> extends Object implements EntityDomainType<T>
Acts as theEntityDomainTypefor 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<? extends T>> 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.metamodel.model.domain.DomainType
getTupleLength
-
Methods inherited from interface org.hibernate.metamodel.model.domain.EntityDomainType
getSqmType
-
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
findSubPathSource, getExpressible, getIntermediatePathSource, getSubPathSource, getSubPathSource, isGeneric
-
-
-
-
Constructor Detail
-
SqmPolymorphicRootDescriptor
public SqmPolymorphicRootDescriptor(JavaType<T> polymorphicJavaType, Set<EntityDomainType<? extends T>> implementors)
-
-
Method Detail
-
getImplementors
public Set<EntityDomainType<? extends T>> getImplementors()
-
getName
public String getName()
- Specified by:
getNamein interfaceEntityType<T>
-
getHibernateEntityName
public String getHibernateEntityName()
- Specified by:
getHibernateEntityNamein interfaceEntityDomainType<T>
-
getTypeName
public String getTypeName()
Description copied from interface:ManagedDomainTypeGet the type name.- Specified by:
getTypeNamein interfaceManagedDomainType<T>- Specified by:
getTypeNamein interfaceSqmExpressible<T>- Returns:
- The type name.
- See Also:
ManagedDomainType.getRepresentationMode()
-
getPathName
public String getPathName()
Description copied from interface:SqmPathSourceThe name of this thing.- Specified by:
getPathNamein interfaceSqmPathSource<T>
-
getSqmPathType
public DomainType<T> getSqmPathType()
Description copied from interface:SqmPathSourceThe type of path this source creates.- Specified by:
getSqmPathTypein interfaceSqmPathSource<T>
-
getBindableType
public Bindable.BindableType getBindableType()
- Specified by:
getBindableTypein interfaceBindable<T>
-
getBindableJavaType
public Class<T> getBindableJavaType()
Description copied from interface:BindableTypeThe expected Java type- Specified by:
getBindableJavaTypein interfaceBindable<T>- Specified by:
getBindableJavaTypein interfaceBindableType<T>
-
getPersistenceType
public Type.PersistenceType getPersistenceType()
- Specified by:
getPersistenceTypein interfaceType<T>
-
getJavaType
public Class<T> getJavaType()
- Specified by:
getJavaTypein interfaceType<T>
-
getExpressibleJavaType
public JavaType<T> getExpressibleJavaType()
Description copied from interface:SqmExpressibleThe Java type descriptor for this expressible- Specified by:
getExpressibleJavaTypein interfaceSqmExpressible<T>
-
findAttribute
public PersistentAttribute<? super T,?> findAttribute(String name)
- Specified by:
findAttributein interfaceManagedDomainType<T>
-
findSubTypesAttribute
public PersistentAttribute<?,?> findSubTypesAttribute(String name)
- Specified by:
findSubTypesAttributein interfaceManagedDomainType<T>
-
findAttributeInSuperTypes
public PersistentAttribute<? super T,?> findAttributeInSuperTypes(String name)
- Specified by:
findAttributeInSuperTypesin interfaceManagedDomainType<T>
-
visitAttributes
public void visitAttributes(Consumer<? super PersistentAttribute<? super T,?>> action)
- Specified by:
visitAttributesin interfaceManagedDomainType<T>
-
visitDeclaredAttributes
public void visitDeclaredAttributes(Consumer<? super PersistentAttribute<T,?>> action)
- Specified by:
visitDeclaredAttributesin interfaceManagedDomainType<T>
-
getAttribute
public PersistentAttribute<? super T,?> getAttribute(String name)
- Specified by:
getAttributein interfaceManagedDomainType<T>- Specified by:
getAttributein interfaceManagedType<T>
-
getDeclaredAttribute
public PersistentAttribute<T,?> getDeclaredAttribute(String name)
- Specified by:
getDeclaredAttributein interfaceManagedDomainType<T>- Specified by:
getDeclaredAttributein interfaceManagedType<T>
-
findSingularAttribute
public SingularPersistentAttribute<? super T,?> findSingularAttribute(String name)
- Specified by:
findSingularAttributein interfaceManagedDomainType<T>
-
findPluralAttribute
public PluralPersistentAttribute<? super T,?,?> findPluralAttribute(String name)
- Specified by:
findPluralAttributein interfaceManagedDomainType<T>
-
findConcreteGenericAttribute
public PersistentAttribute<? super T,?> findConcreteGenericAttribute(String name)
- Specified by:
findConcreteGenericAttributein interfaceManagedDomainType<T>
-
findDeclaredAttribute
public PersistentAttribute<T,?> findDeclaredAttribute(String name)
- Specified by:
findDeclaredAttributein interfaceManagedDomainType<T>
-
findDeclaredSingularAttribute
public SingularPersistentAttribute<T,?> findDeclaredSingularAttribute(String name)
- Specified by:
findDeclaredSingularAttributein interfaceManagedDomainType<T>
-
findDeclaredPluralAttribute
public PluralPersistentAttribute<T,?,?> findDeclaredPluralAttribute(String name)
- Specified by:
findDeclaredPluralAttributein interfaceManagedDomainType<T>
-
findDeclaredConcreteGenericAttribute
public PersistentAttribute<T,?> findDeclaredConcreteGenericAttribute(String name)
- Specified by:
findDeclaredConcreteGenericAttributein interfaceManagedDomainType<T>
-
getAttributes
public Set<Attribute<? super T,?>> getAttributes()
- Specified by:
getAttributesin interfaceManagedType<T>
-
getDeclaredAttributes
public Set<Attribute<T,?>> getDeclaredAttributes()
- Specified by:
getDeclaredAttributesin interfaceManagedType<T>
-
getSingularAttribute
public <Y> SingularAttribute<? super T,Y> getSingularAttribute(String name, Class<Y> type)
- Specified by:
getSingularAttributein interfaceManagedType<T>
-
getDeclaredSingularAttribute
public <Y> SingularAttribute<T,Y> getDeclaredSingularAttribute(String name, Class<Y> type)
- Specified by:
getDeclaredSingularAttributein interfaceManagedType<T>
-
getSingularAttributes
public Set<SingularAttribute<? super T,?>> getSingularAttributes()
- Specified by:
getSingularAttributesin interfaceManagedType<T>
-
getDeclaredSingularAttributes
public Set<SingularAttribute<T,?>> getDeclaredSingularAttributes()
- Specified by:
getDeclaredSingularAttributesin interfaceManagedType<T>
-
getCollection
public <E> CollectionAttribute<? super T,E> getCollection(String name, Class<E> elementType)
- Specified by:
getCollectionin interfaceManagedType<T>
-
getDeclaredCollection
public <E> CollectionAttribute<T,E> getDeclaredCollection(String name, Class<E> elementType)
- Specified by:
getDeclaredCollectionin interfaceManagedType<T>
-
getSet
public <E> SetAttribute<? super T,E> getSet(String name, Class<E> elementType)
- Specified by:
getSetin interfaceManagedType<T>
-
getDeclaredSet
public <E> SetAttribute<T,E> getDeclaredSet(String name, Class<E> elementType)
- Specified by:
getDeclaredSetin interfaceManagedType<T>
-
getList
public <E> ListAttribute<? super T,E> getList(String name, Class<E> elementType)
- Specified by:
getListin interfaceManagedType<T>
-
getDeclaredList
public <E> ListAttribute<T,E> getDeclaredList(String name, Class<E> elementType)
- Specified by:
getDeclaredListin interfaceManagedType<T>
-
getMap
public <K,V> MapAttribute<? super T,K,V> getMap(String name, Class<K> keyType, Class<V> valueType)
- Specified by:
getMapin interfaceManagedType<T>
-
getDeclaredMap
public <K,V> MapAttribute<T,K,V> getDeclaredMap(String name, Class<K> keyType, Class<V> valueType)
- Specified by:
getDeclaredMapin interfaceManagedType<T>
-
getPluralAttributes
public Set<PluralAttribute<? super T,?,?>> getPluralAttributes()
- Specified by:
getPluralAttributesin interfaceManagedType<T>
-
getDeclaredPluralAttributes
public Set<PluralAttribute<T,?,?>> getDeclaredPluralAttributes()
- Specified by:
getDeclaredPluralAttributesin interfaceManagedType<T>
-
getSingularAttribute
public SingularAttribute<? super T,?> getSingularAttribute(String name)
- Specified by:
getSingularAttributein interfaceManagedType<T>
-
getDeclaredSingularAttribute
public SingularAttribute<T,?> getDeclaredSingularAttribute(String name)
- Specified by:
getDeclaredSingularAttributein interfaceManagedType<T>
-
getCollection
public CollectionAttribute<? super T,?> getCollection(String name)
- Specified by:
getCollectionin interfaceManagedType<T>
-
getDeclaredCollection
public CollectionAttribute<T,?> getDeclaredCollection(String name)
- Specified by:
getDeclaredCollectionin interfaceManagedType<T>
-
getSet
public SetAttribute<? super T,?> getSet(String name)
- Specified by:
getSetin interfaceManagedType<T>
-
getDeclaredSet
public SetAttribute<T,?> getDeclaredSet(String name)
- Specified by:
getDeclaredSetin interfaceManagedType<T>
-
getList
public ListAttribute<? super T,?> getList(String name)
- Specified by:
getListin interfaceManagedType<T>
-
getDeclaredList
public ListAttribute<T,?> getDeclaredList(String name)
- Specified by:
getDeclaredListin interfaceManagedType<T>
-
getMap
public MapAttribute<? super T,?,?> getMap(String name)
- Specified by:
getMapin interfaceManagedType<T>
-
getDeclaredMap
public MapAttribute<T,?,?> getDeclaredMap(String name)
- Specified by:
getDeclaredMapin interfaceManagedType<T>
-
findSubPathSource
public SqmPathSource<?> findSubPathSource(String name)
Description copied from interface:SqmPathSourceFind aSqmPathSourceby name relative to this source.- Specified by:
findSubPathSourcein interfaceSqmPathSource<T>- Returns:
- null if the subPathSource is not found
-
createSqmPath
public SqmPath<T> createSqmPath(SqmPath<?> lhs, SqmPathSource<?> intermediatePathSource)
Description copied from interface:SqmPathSourceCreate an SQM path for this source relative to the given left hand side- Specified by:
createSqmPathin interfaceSqmPathSource<T>
-
getRepresentationMode
public RepresentationMode getRepresentationMode()
- Specified by:
getRepresentationModein interfaceManagedDomainType<T>
-
getIdentifierDescriptor
public SqmPathSource<?> getIdentifierDescriptor()
- Specified by:
getIdentifierDescriptorin interfaceIdentifiableDomainType<T>
-
getId
public <Y> SingularPersistentAttribute<? super T,Y> getId(Class<Y> type)
- Specified by:
getIdin interfaceIdentifiableDomainType<T>- Specified by:
getIdin interfaceIdentifiableType<T>
-
getDeclaredId
public <Y> SingularPersistentAttribute<T,Y> getDeclaredId(Class<Y> type)
- Specified by:
getDeclaredIdin interfaceIdentifiableDomainType<T>- Specified by:
getDeclaredIdin interfaceIdentifiableType<T>
-
getVersion
public <Y> SingularPersistentAttribute<? super T,Y> getVersion(Class<Y> type)
- Specified by:
getVersionin interfaceIdentifiableDomainType<T>- Specified by:
getVersionin interfaceIdentifiableType<T>
-
getDeclaredVersion
public <Y> SingularPersistentAttribute<T,Y> getDeclaredVersion(Class<Y> type)
- Specified by:
getDeclaredVersionin interfaceIdentifiableDomainType<T>- Specified by:
getDeclaredVersionin interfaceIdentifiableType<T>
-
getIdClassAttributes
public Set<SingularAttribute<? super T,?>> getIdClassAttributes()
- Specified by:
getIdClassAttributesin interfaceIdentifiableDomainType<T>- Specified by:
getIdClassAttributesin interfaceIdentifiableType<T>
-
getIdType
public SimpleDomainType<?> getIdType()
- Specified by:
getIdTypein interfaceIdentifiableDomainType<T>- Specified by:
getIdTypein interfaceIdentifiableType<T>
-
getSupertype
public IdentifiableDomainType<? super T> getSupertype()
- Specified by:
getSupertypein interfaceIdentifiableDomainType<T>- Specified by:
getSupertypein interfaceIdentifiableType<T>
-
hasIdClass
public boolean hasIdClass()
- Specified by:
hasIdClassin interfaceIdentifiableDomainType<T>
-
findIdAttribute
public SingularPersistentAttribute<? super T,?> findIdAttribute()
- Specified by:
findIdAttributein interfaceIdentifiableDomainType<T>
-
visitIdClassAttributes
public void visitIdClassAttributes(Consumer<SingularPersistentAttribute<? super T,?>> action)
- Specified by:
visitIdClassAttributesin interfaceIdentifiableDomainType<T>
-
findVersionAttribute
public SingularPersistentAttribute<? super T,?> findVersionAttribute()
- Specified by:
findVersionAttributein interfaceIdentifiableDomainType<T>
-
findNaturalIdAttributes
public List<? extends SingularPersistentAttribute<? super T,?>> findNaturalIdAttributes()
- Specified by:
findNaturalIdAttributesin interfaceIdentifiableDomainType<T>
-
hasSingleIdAttribute
public boolean hasSingleIdAttribute()
- Specified by:
hasSingleIdAttributein interfaceIdentifiableType<T>
-
hasVersionAttribute
public boolean hasVersionAttribute()
- Specified by:
hasVersionAttributein interfaceIdentifiableType<T>
-
getSuperType
public ManagedDomainType<? super T> getSuperType()
Description copied from interface:ManagedDomainTypeThe descriptor of the supertype of this type.- Specified by:
getSuperTypein interfaceManagedDomainType<T>
-
getSubTypes
public Collection<? extends EntityDomainType<? extends T>> getSubTypes()
- Specified by:
getSubTypesin interfaceEntityDomainType<T>- Specified by:
getSubTypesin interfaceManagedDomainType<T>
-
addSubType
public void addSubType(ManagedDomainType<? extends T> subType)
- Specified by:
addSubTypein interfaceManagedDomainType<T>
-
-