X - The represented entity or mapped superclass type.public abstract class IdentifiableTypeImpl<X> extends ManagedTypeImpl<X>
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.
javax.persistence.metamodel.EntityType,
Serialized Formdescriptor, metamodel| Modifier | Constructor and Description |
|---|---|
protected |
IdentifiableTypeImpl(MetamodelImpl metamodel,
ClassDescriptor descriptor) |
| Modifier and Type | Method and Description |
|---|---|
<Y> <any> |
getDeclaredId(java.lang.Class<Y> type)
Return the attribute that corresponds to the id attribute
declared by the entity or mapped superclass.
|
<Y> <any> |
getDeclaredVersion(java.lang.Class<Y> type)
Return the attribute that corresponds to the version
attribute declared by the entity or mapped superclass.
|
<Y> <any> |
getId(java.lang.Class<Y> type)
Return the attribute that corresponds to the id attribute of
the entity or mapped superclass.
|
java.util.Set<<any>> |
getIdClassAttributes()
Return the attributes corresponding to the id class of the
identifiable type.
|
<any> |
getIdType()
Return the type that represents the type of the id.
|
<any> |
getSupertype()
Return the identifiable type that corresponds to the most
specific mapped superclass or entity extended by the entity
or mapped superclass.
|
<Y> <any> |
getVersion(java.lang.Class<Y> type)
Return the attribute that corresponds to the version
attribute of the entity or mapped superclass.
|
boolean |
hasSingleIdAttribute()
Whether or not the identifiable type has an id attribute.
|
boolean |
hasVersionAttribute()
Whether or not the identifiable type has a version attribute.
|
protected void |
initializeIdAttributes()
INTERNAL:
The idAttributes collection is computed at the end of MetamodelImpl.initialize()
|
protected boolean |
isIdentifiableType()
INTERNAL:
Return whether this type is identifiable.
|
protected void |
setSupertype(<any> superType)
INTERNAL:
Set the superType for this IdentifiableType - only after all ManagedTypes
have been instantiated for this Metamodel.
|
create, getAttribute, getAttributes, getCollection, getCollection, getDeclaredAttribute, getDeclaredAttribute, getDeclaredAttributes, getDeclaredCollection, getDeclaredCollection, getDeclaredList, getDeclaredList, getDeclaredMap, getDeclaredMap, getDeclaredPluralAttributes, getDeclaredSet, getDeclaredSet, getDeclaredSingularAttribute, getDeclaredSingularAttribute, getDeclaredSingularAttributes, getDescriptor, getList, getList, getMap, getMap, getMembers, getMetamodel, getPluralAttributes, getSet, getSet, getSingularAttribute, getSingularAttribute, getSingularAttributes, getTypeClassFromAttributeOrMethodLevelAccessor, initialize, isManagedType, toStringHelpergetJavaType, getJavaType, getJavaTypeName, isEntity, isMappedSuperclass, toStringprotected IdentifiableTypeImpl(MetamodelImpl metamodel, ClassDescriptor descriptor)
protected void initializeIdAttributes()
public <Y> <any> getDeclaredId(java.lang.Class<Y> type)
type - the type of the represented declared id attributejava.lang.IllegalArgumentException - if id attribute of the given
type is not declared in the identifiable type or if
the identifiable type has an id classpublic <Y> <any> getDeclaredVersion(java.lang.Class<Y> type)
type - the type of the represented declared version
attributejava.lang.IllegalArgumentException - if version attribute of the
type is not declared in the identifiable typepublic java.util.Set<<any>> getIdClassAttributes()
java.lang.IllegalArgumentException - if the identifiable type
does not have an id classpublic <Y> <any> getId(java.lang.Class<Y> type)
type - the type of the represented id attributejava.lang.IllegalArgumentException - if id attribute of the given
type is not present in the identifiable type or if
the identifiable type has an id classpublic <any> getIdType()
public <any> getSupertype()
public <Y> <any> getVersion(java.lang.Class<Y> type)
type - the type of the represented version attributejava.lang.IllegalArgumentException - if version attribute of the
given type is not present in the identifiable typepublic boolean hasSingleIdAttribute()
public boolean hasVersionAttribute()
protected boolean isIdentifiableType()
isIdentifiableType in class ManagedTypeImpl<X>protected void setSupertype(<any> superType)
Top-level identifiable types have their supertype set to null.
superType - - the entity or mappedSuperclass superType