X - The represented entity or mapped superclass type.public abstract class IdentifiableTypeImpl<X> extends ManagedTypeImpl<X> implements javax.persistence.metamodel.IdentifiableType<X>
IdentifiableType.| Constructor and Description |
|---|
IdentifiableTypeImpl(MetamodelImpl metamodel,
IdentifiableTypeImpl<? super X> supertype,
Class<X> javaType,
IdentifiableTypeMetadata metadata) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addAttribute(AttributeImpl<? super X,?> attribute)
Adds the attribute into attributes.
|
protected void |
addAttributes(ManagedTypeMetadata entityMetadata)
Creates and adds the attributes of the managed type from the metadata.
|
void |
fireCallbacks(boolean self,
Object instance,
EntityListenerMetadata.EntityListenerType type)
Fires the callbacks.
|
CallbackAvailability |
getAvailability()
Returns the callback availability.
|
protected CallbackManager |
getCallbackManager()
Returns the callbackManager.
|
<Y> javax.persistence.metamodel.SingularAttribute<X,Y> |
getDeclaredId(Class<Y> type) |
<Y> javax.persistence.metamodel.SingularAttribute<X,Y> |
getDeclaredVersion(Class<Y> type) |
<Y> javax.persistence.metamodel.SingularAttribute<? super X,Y> |
getId(Class<Y> type) |
Class<?> |
getIdClass()
Returns the id class of the identifiable type.
|
Set<javax.persistence.metamodel.SingularAttribute<? super X,?>> |
getIdClassAttributes() |
javax.persistence.metamodel.Type<?> |
getIdType() |
IdentifiableTypeImpl<? super X> |
getSupertype() |
<Y> BasicAttribute<? super X,Y> |
getVersion(Class<Y> type) |
BasicAttribute<? super X,?> |
getVersionAttribute()
Returns the version attribute.
|
VersionType |
getVersionType()
Returns the type of the version attribute.
|
boolean |
hasSingleIdAttribute() |
boolean |
hasVersionAttribute() |
Object |
newCompositeId()
Returns a generated idClass instance based on the id class.
|
void |
updateAvailability(CallbackAvailability availability,
Boolean forUpdates)
Updates the callback availability.
|
getAttribute, getAttributes, getCollection, getCollection, getDeclaredAttribute, getDeclaredAttributes, getDeclaredCollection, getDeclaredCollection, getDeclaredList, getDeclaredList, getDeclaredMap, getDeclaredMap, getDeclaredPluralAttributes, getDeclaredSet, getDeclaredSet, getDeclaredSingularAttribute, getDeclaredSingularAttribute, getDeclaredSingularAttributes, getList, getList, getLocator, getMap, getMap, getName, getPluralAttributes, getSet, getSet, getSingularAttribute, getSingularAttribute, getSingularAttributesgetJavaType, getMetamodelclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAttribute, getAttributes, getCollection, getCollection, getDeclaredAttribute, getDeclaredAttributes, getDeclaredCollection, getDeclaredCollection, getDeclaredList, getDeclaredList, getDeclaredMap, getDeclaredMap, getDeclaredPluralAttributes, getDeclaredSet, getDeclaredSet, getDeclaredSingularAttribute, getDeclaredSingularAttribute, getDeclaredSingularAttributes, getList, getList, getMap, getMap, getPluralAttributes, getSet, getSet, getSingularAttribute, getSingularAttribute, getSingularAttributesgetJavaTypepublic IdentifiableTypeImpl(MetamodelImpl metamodel, IdentifiableTypeImpl<? super X> supertype, Class<X> javaType, IdentifiableTypeMetadata metadata)
metamodel - the metamodelsupertype - the super typejavaType - the java type of the managed typemetadata - the metadataprotected void addAttribute(AttributeImpl<? super X,?> attribute)
addAttribute in class ManagedTypeImpl<X>attribute - the declared attributeprotected void addAttributes(ManagedTypeMetadata entityMetadata)
addAttributes in class ManagedTypeImpl<X>entityMetadata - the metadatapublic void fireCallbacks(boolean self,
Object instance,
EntityListenerMetadata.EntityListenerType type)
instance - the instancetype - the listener typeself - if the object belongs to this typepublic CallbackAvailability getAvailability()
protected CallbackManager getCallbackManager()
public <Y> javax.persistence.metamodel.SingularAttribute<X,Y> getDeclaredId(Class<Y> type)
getDeclaredId in interface javax.persistence.metamodel.IdentifiableType<X>public <Y> javax.persistence.metamodel.SingularAttribute<X,Y> getDeclaredVersion(Class<Y> type)
getDeclaredVersion in interface javax.persistence.metamodel.IdentifiableType<X>public <Y> javax.persistence.metamodel.SingularAttribute<? super X,Y> getId(Class<Y> type)
getId in interface javax.persistence.metamodel.IdentifiableType<X>public Class<?> getIdClass()
public Set<javax.persistence.metamodel.SingularAttribute<? super X,?>> getIdClassAttributes()
getIdClassAttributes in interface javax.persistence.metamodel.IdentifiableType<X>public javax.persistence.metamodel.Type<?> getIdType()
getIdType in interface javax.persistence.metamodel.IdentifiableType<X>public IdentifiableTypeImpl<? super X> getSupertype()
getSupertype in interface javax.persistence.metamodel.IdentifiableType<X>public <Y> BasicAttribute<? super X,Y> getVersion(Class<Y> type)
getVersion in interface javax.persistence.metamodel.IdentifiableType<X>public BasicAttribute<? super X,?> getVersionAttribute()
public VersionType getVersionType()
public boolean hasSingleIdAttribute()
hasSingleIdAttribute in interface javax.persistence.metamodel.IdentifiableType<X>public boolean hasVersionAttribute()
hasVersionAttribute in interface javax.persistence.metamodel.IdentifiableType<X>public Object newCompositeId()
public void updateAvailability(CallbackAvailability availability, Boolean forUpdates)
availability - the callback availabilityforUpdates - true if for updates or false for removalsCopyright © 2012 Batoo Software & Consultancy. All Rights Reserved.