Class AbstractIdentifiableType<J>
java.lang.Object
org.hibernate.metamodel.model.domain.internal.AbstractDomainType<J>
org.hibernate.metamodel.model.domain.internal.AbstractManagedType<J>
org.hibernate.metamodel.model.domain.internal.AbstractIdentifiableType<J>
- All Implemented Interfaces:
IdentifiableType<J>,ManagedType<J>,Type<J>,Serializable,DomainType<J>,IdentifiableDomainType<J>,AttributeContainer<J>,ManagedDomainType<J>,SimpleDomainType<J>,SqmBindableType<J>,SqmExpressible<J>,SqmDomainType<J>,SqmManagedDomainType<J>,BindableType<J>
- Direct Known Subclasses:
EntityTypeImpl,MappedSuperclassTypeImpl
public abstract class AbstractIdentifiableType<J>
extends AbstractManagedType<J>
implements IdentifiableDomainType<J>, Serializable
Functionality common to all implementations of
IdentifiableType.
An identifiable type is one which may have an identifier attribute, that is, an entity type or a mapped superclass.
- See Also:
- API Note:
- Currently we only really have support for direct entities in the Hibernate metamodel as the information for them is consumed into the closest actual entity subclass(es) in the internal Hibernate mapping metamodel.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.metamodel.model.domain.internal.AttributeContainer
AttributeContainer.InFlightAccess<J>Nested classes/interfaces inherited from interface jakarta.persistence.metamodel.Type
Type.PersistenceType -
Constructor Summary
ConstructorsConstructorDescriptionAbstractIdentifiableType(String typeName, JavaType<J> javaType, IdentifiableDomainType<? super J> superType, boolean hasIdClass, boolean hasIdentifierProperty, boolean versioned, JpaMetamodelImplementor metamodel) -
Method Summary
Modifier and TypeMethodDescriptionprotected AttributeContainer.InFlightAccess<J> SqmSingularPersistentAttribute<? super J, ?> List<? extends PersistentAttribute<? super J, ?>> SqmSingularPersistentAttribute<? super J, ?> <Y> SqmSingularPersistentAttribute<J, Y> getDeclaredId(Class<Y> javaType) For used to retrieve the declared version when populating the static metamodel.<Y> SingularPersistentAttribute<J, Y> getDeclaredVersion(Class<Y> javaType) <Y> SqmSingularPersistentAttribute<? super J, Y> Set<SingularAttribute<? super J, ?>> Set<SingularPersistentAttribute<? super J, ?>> A form ofgetIdClassAttributes()which prefers to returnnullrather than throw exceptionsIdentifiableDomainType<? super J> AbstractIdentifiableType<? super J> The descriptor of the supertype of this type.<Y> SingularPersistentAttribute<? super J, Y> getVersion(Class<Y> javaType) booleanbooleanbooleanbooleanprotected booleanvoidvisitIdClassAttributes(Consumer<SingularPersistentAttribute<? super J, ?>> attributeConsumer) Methods inherited from class org.hibernate.metamodel.model.domain.internal.AbstractManagedType
addSubType, findAttribute, findAttributeInSuperTypes, findConcreteGenericAttribute, findDeclaredAttribute, findDeclaredConcreteGenericAttribute, findDeclaredPluralAttribute, findDeclaredSingularAttribute, findPluralAttribute, findSingularAttribute, findSubTypesAttribute, getAttribute, getAttributes, getCollection, getCollection, getDeclaredAttribute, getDeclaredAttributes, getDeclaredCollection, getDeclaredCollection, getDeclaredList, getDeclaredList, getDeclaredMap, getDeclaredMap, getDeclaredPluralAttributes, getDeclaredSet, getDeclaredSet, getDeclaredSingularAttribute, getDeclaredSingularAttribute, getDeclaredSingularAttributes, getInFlightAccess, getJavaType, getList, getList, getMap, getMap, getMetamodel, getPluralAttributes, getRepresentationMode, getSet, getSet, getSingularAttribute, getSingularAttribute, getSingularAttributes, getSubTypes, getTypeName, isPrimitiveVariant, toString, visitAttributes, visitDeclaredAttributes, writeReplaceMethods inherited from class org.hibernate.metamodel.model.domain.internal.AbstractDomainType
getExpressibleJavaTypeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.hibernate.metamodel.model.domain.DomainType
getExpressibleJavaTypeMethods inherited from interface org.hibernate.metamodel.model.domain.ManagedDomainType
addSubType, getAttribute, getDeclaredAttribute, getMetamodel, getRepresentationMode, getSubTypes, visitAttributes, visitDeclaredAttributesMethods inherited from interface jakarta.persistence.metamodel.ManagedType
getAttributes, getCollection, getCollection, getDeclaredAttributes, getDeclaredCollection, getDeclaredCollection, getDeclaredList, getDeclaredList, getDeclaredMap, getDeclaredMap, getDeclaredPluralAttributes, getDeclaredSet, getDeclaredSet, getDeclaredSingularAttribute, getDeclaredSingularAttribute, getDeclaredSingularAttributes, getList, getList, getMap, getMap, getPluralAttributes, getSet, getSet, getSingularAttribute, getSingularAttribute, getSingularAttributesMethods inherited from interface org.hibernate.query.sqm.SqmBindableType
resolveExpressibleMethods inherited from interface org.hibernate.query.sqm.tree.domain.SqmDomainType
getTupleLengthMethods inherited from interface org.hibernate.query.sqm.SqmExpressible
getExpressibleJavaType, getRelationalJavaType, getSqmTypeMethods inherited from interface jakarta.persistence.metamodel.Type
getJavaType, getPersistenceType
-
Constructor Details
-
AbstractIdentifiableType
public AbstractIdentifiableType(String typeName, JavaType<J> javaType, IdentifiableDomainType<? super J> superType, boolean hasIdClass, boolean hasIdentifierProperty, boolean versioned, JpaMetamodelImplementor metamodel)
-
-
Method Details
-
createInFlightAccess
- Overrides:
createInFlightAccessin classAbstractManagedType<J>
-
getIdentifierDescriptor
- Specified by:
getIdentifierDescriptorin interfaceIdentifiableDomainType<J>
-
hasIdClass
public boolean hasIdClass()- Specified by:
hasIdClassin interfaceIdentifiableDomainType<J>
-
hasSingleIdAttribute
public boolean hasSingleIdAttribute()- Specified by:
hasSingleIdAttributein interfaceIdentifiableType<J>
-
getSuperType
Description copied from interface:ManagedDomainTypeThe descriptor of the supertype of this type.- Specified by:
getSuperTypein interfaceManagedDomainType<J>- Overrides:
getSuperTypein classAbstractManagedType<J>
-
getSupertype
- Specified by:
getSupertypein interfaceIdentifiableDomainType<J>- Specified by:
getSupertypein interfaceIdentifiableType<J>
-
getId
- Specified by:
getIdin interfaceIdentifiableDomainType<J>- Specified by:
getIdin interfaceIdentifiableType<J>
-
findIdAttribute
- Specified by:
findIdAttributein interfaceIdentifiableDomainType<J>
-
getDeclaredId
- Specified by:
getDeclaredIdin interfaceIdentifiableDomainType<J>- Specified by:
getDeclaredIdin interfaceIdentifiableType<J>
-
getIdType
- Specified by:
getIdTypein interfaceIdentifiableDomainType<J>- Specified by:
getIdTypein interfaceIdentifiableType<J>
-
getIdClassAttributesSafely
A form ofgetIdClassAttributes()which prefers to returnnullrather than throw exceptions- Returns:
- IdClass attributes or
null
-
getIdClassAttributes
- Specified by:
getIdClassAttributesin interfaceIdentifiableDomainType<J>- Specified by:
getIdClassAttributesin interfaceIdentifiableType<J>
-
visitIdClassAttributes
public void visitIdClassAttributes(Consumer<SingularPersistentAttribute<? super J, ?>> attributeConsumer) - Specified by:
visitIdClassAttributesin interfaceIdentifiableDomainType<J>
-
hasVersionAttribute
public boolean hasVersionAttribute()- Specified by:
hasVersionAttributein interfaceIdentifiableType<J>
-
hasDeclaredVersionAttribute
public boolean hasDeclaredVersionAttribute() -
getVersion
- Specified by:
getVersionin interfaceIdentifiableDomainType<J>- Specified by:
getVersionin interfaceIdentifiableType<J>
-
findVersionAttribute
- Specified by:
findVersionAttributein interfaceIdentifiableDomainType<J>
-
findNaturalIdAttributes
- Specified by:
findNaturalIdAttributesin interfaceIdentifiableDomainType<J>
-
getDeclaredVersion
- Specified by:
getDeclaredVersionin interfaceIdentifiableDomainType<J>- Specified by:
getDeclaredVersionin interfaceIdentifiableType<J>
-
getDeclaredVersion
For used to retrieve the declared version when populating the static metamodel.- Returns:
- The declared
-
isIdMappingRequired
protected boolean isIdMappingRequired()
-