Purpose: Provides the implementation for the Entity interface of the JPA 2.0 Metamodel API (part of the JSR-317 EJB 3.1 Criteria API)
Description: Instances of the type IdentifiableType represent entity or mapped superclass types.
jakarta.persistence.metamodel.EntityType
| Modifier and Type | Field and Description |
|---|---|
| private Set | idAttributes
The collection of SingularAttributes that are Id attributes. |
| private IdentifiableType | superType
The supertype may be an entity or mappedSuperclass. |
| private SingularAttribute | versionAttribute
The SingularAttribute if it exists that is a version attribute |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public <Y> SingularAttribute | Returns: declared id attributethe type of the represented declared id attribute type)Implements jakarta. |
| public <Y> SingularAttribute | Returns: declared version attributethe type of the represented declared version
attribute type)Implements jakarta. |
| public <Y> SingularAttribute | Returns: id attributethe type of the represented id attribute type)Implements jakarta. |
| public Set | Returns: id attributesImplements jakarta. |
| public Type | Returns: type of idImplements jakarta. |
| public IdentifiableType | Returns: supertype of identifiable type or null if no such supertypeImplements jakarta. |
| public <Y> SingularAttribute | Returns: version attributethe type of the represented version attribute type)Implements jakarta. |
| private <Y> SingularAttribute | |
| public boolean | Returns: boolean indicating whether or not the identifiable type has a single id attributeImplements jakarta. |
| public boolean | Returns: boolean indicating whether or not the identifiable type has a version attributeImplements jakarta. |
| protected void | initializeIdAttributes()
INTERNAL: The idAttributes collection is computed at the end of MetamodelImpl.initialize() |
| protected boolean | isIdentifiableType()
Overrides org. |
| protected void | setSupertype(IdentifiableType<? super X>
- the entity or mappedSuperclass superType superType)INTERNAL: Set the superType for this IdentifiableType - only after all ManagedTypes have been instantiated for this Metamodel. |
| idAttributes | back to summary |
|---|---|
| private Set<SingularAttribute<? super X, ?>> idAttributes The collection of SingularAttributes that are Id attributes. | |
| superType | back to summary |
|---|---|
| private IdentifiableType<? super X> superType The supertype may be an entity or mappedSuperclass. For top-level inheritance root identifiable types with no superclass - return null (not Object) | |
| versionAttribute | back to summary |
|---|---|
| private SingularAttribute<? super X, ?> versionAttribute The SingularAttribute if it exists that is a version attribute | |
| IdentifiableTypeImpl | back to summary |
|---|---|
| protected IdentifiableTypeImpl(MetamodelImpl metamodel, ClassDescriptor descriptor) | |
| getDeclaredId | back to summary |
|---|---|
| public <Y> SingularAttribute Implements jakarta. Return the attribute that corresponds to the id attribute declared by the entity or mapped superclass.
| |
| getDeclaredVersion | back to summary |
|---|---|
| public <Y> SingularAttribute Implements jakarta. Return the attribute that corresponds to the version attribute declared by the entity or mapped superclass.
| |
| getId | back to summary |
|---|---|
| public <Y> SingularAttribute Implements jakarta. Return the attribute that corresponds to the id attribute of the entity or mapped superclass.
| |
| getIdClassAttributes | back to summary |
|---|---|
| public Set Implements jakarta. Return the attributes corresponding to the id class of the identifiable type.
| |
| getIdType | back to summary |
|---|---|
| public Type Implements jakarta. Return the type that represents the type of the id. | |
| getSupertype | back to summary |
|---|---|
| public IdentifiableType Implements jakarta. Return the identifiable type that corresponds to the most specific mapped superclass or entity extended by the entity or mapped superclass.
| |
| getVersion | back to summary |
|---|---|
| public <Y> SingularAttribute Implements jakarta. Return the attribute that corresponds to the version attribute of the entity or mapped superclass.
| |
| getVersion | back to summary |
|---|---|
| private <Y> SingularAttribute INTERNAL: Return the version attribute on this type. If no version attribute exists - return null. | |
| hasSingleIdAttribute | back to summary |
|---|---|
| public boolean hasSingleIdAttribute() Implements jakarta. Whether or not the identifiable type has an id attribute. Returns true for a simple id or embedded id; returns false for an idclass.
| |
| hasVersionAttribute | back to summary |
|---|---|
| public boolean hasVersionAttribute() Implements jakarta. Whether or not the identifiable type has a version attribute.
| |
| initializeIdAttributes | back to summary |
|---|---|
| protected void initializeIdAttributes() INTERNAL: The idAttributes collection is computed at the end of MetamodelImpl.initialize() | |
| isIdentifiableType | back to summary |
|---|---|
| protected boolean isIdentifiableType() Overrides org. INTERNAL: Return whether this type is identifiable. This would be EntityType and MappedSuperclassType
| |
| setSupertype | back to summary |
|---|---|
| protected void setSupertype(IdentifiableType<? super X> superType) INTERNAL: Set the superType for this IdentifiableType - only after all ManagedTypes have been instantiated for this Metamodel. Top-level identifiable types have their supertype set to null.
| |