EclipseLink 2.0.0_ 2.0.0.v20090424-r4050 API Reference

javax.persistence.metamodel
Interface IdentifiableType<X>

Type Parameters:
X - The represented entity or mapped superclass type.
All Superinterfaces:
Bindable<X>, ManagedType<X>, Type<X>
All Known Subinterfaces:
Entity<X>, MappedSuperclass<X>

public interface IdentifiableType<X>
extends ManagedType<X>

Instances of the type IdentifiableType represent entity or mapped superclass types.


Nested Class Summary
 
Nested classes/interfaces inherited from interface javax.persistence.metamodel.Type
Type.PersistenceType
 
Nested classes/interfaces inherited from interface javax.persistence.metamodel.Bindable
Bindable.BindableType
 
Method Summary
<Y> Attribute<X,Y>
getDeclaredId(java.lang.Class<Y> type)
          Return the attribute that corresponds to the id attribute declared by the entity or mapped superclass.
<Y> Attribute<X,Y>
getDeclaredVersion(java.lang.Class<Y> type)
          Return the attribute that corresponds to the version attribute declared by the entity or mapped superclass.
<Y> Attribute<? super X,Y>
getId(java.lang.Class<Y> type)
          Return the attribute that corresponds to the id attribute of the entity or mapped superclass.
 Type<?> getIdType()
          Return the type that represents the type of the id.
 IdentifiableType<? super X> getSupertype()
          Return the identifiable type that corresponds to the most specific mapped superclass or entity extended by the entity or mapped superclass.
<Y> Attribute<? super X,Y>
getVersion(java.lang.Class<Y> type)
          Return the attribute that corresponds to the version attribute of the entity or mapped superclass.
 boolean hasIdAttribute()
          Whether or not the identifiable type has an id attribute.
 
Methods inherited from interface javax.persistence.metamodel.ManagedType
getAttribute, getAttribute, getAttributes, getCollection, getCollection, getCollections, getDeclaredAttribute, getDeclaredAttribute, getDeclaredAttributes, getDeclaredCollection, getDeclaredCollection, getDeclaredCollections, getDeclaredList, getDeclaredList, getDeclaredMap, getDeclaredMap, getDeclaredSet, getDeclaredSet, getList, getList, getMap, getMap, getSet, getSet
 
Methods inherited from interface javax.persistence.metamodel.Type
getJavaType, getPersistenceType
 
Methods inherited from interface javax.persistence.metamodel.Bindable
getBindableType, getJavaType
 

Method Detail

getId

<Y> Attribute<? super X,Y> getId(java.lang.Class<Y> type)
Return the attribute that corresponds to the id attribute of the entity or mapped superclass.

Parameters:
type - the type of the represented id attribute
Returns:
id attribute
Throws:
java.lang.IllegalArgumentException - if id attribute of the given name and type is not present in the identifiable type

getVersion

<Y> Attribute<? super X,Y> getVersion(java.lang.Class<Y> type)
Return the attribute that corresponds to the version attribute of the entity or mapped superclass.

Parameters:
type - the type of the represented version attribute
Returns:
version attribute
Throws:
java.lang.IllegalArgumentException - if version attribute of the given name and type is not present in the identifiable type

getDeclaredId

<Y> Attribute<X,Y> getDeclaredId(java.lang.Class<Y> type)
Return the attribute that corresponds to the id attribute declared by the entity or mapped superclass.

Parameters:
type - the type of the represented declared id attribute
Returns:
declared id attribute
Throws:
java.lang.IllegalArgumentException - if id attribute of the given name and type is not present in the identifiable type

getDeclaredVersion

<Y> Attribute<X,Y> getDeclaredVersion(java.lang.Class<Y> type)
Return the attribute that corresponds to the version attribute declared by the entity or mapped superclass.

Parameters:
type - the type of the represented declared version attribute
Returns:
declared version attribute
Throws:
java.lang.IllegalArgumentException - if version attribute of the given name and type is not present in the identifiable type

getSupertype

IdentifiableType<? super X> getSupertype()
Return the identifiable type that corresponds to the most specific mapped superclass or entity extended by the entity or mapped superclass.

Returns:
supertype of identifiable type

hasIdAttribute

boolean hasIdAttribute()
Whether or not the identifiable type has an id attribute. Returns true for a simple id or embedded id; returns false for an idclass.

Returns:
boolean indicating whether or not the identifiable type has an id attribute

getIdType

Type<?> getIdType()
Return the type that represents the type of the id.

Returns:
type of id

EclipseLink 2.0.0_ 2.0.0.v20090424-r4050 API Reference