X
- The actual type described by this metatype.public abstract class ErraiIdentifiableType<X> extends ErraiManagedType<X> implements javax.persistence.metamodel.IdentifiableType<X>
javaType
Constructor and Description |
---|
ErraiIdentifiableType(Class<X> javaType) |
Modifier and Type | Method and Description |
---|---|
<Y> void |
addAttribute(javax.persistence.metamodel.Attribute<X,Y> attribute) |
abstract <Y> void |
deliverPostLoad(X targetEntity)
Delivers the
PostLoad event to the post-load listeners on the given
instance of this entity. |
abstract void |
deliverPostPersist(X targetEntity)
Delivers the
PostPersist event to the post-persist listeners on the given
instance of this entity. |
abstract void |
deliverPostRemove(X targetEntity)
Delivers the
PostRemove event to the post-Remove listeners on the given
instance of this entity. |
abstract void |
deliverPostUpdate(X targetEntity)
Delivers the
PostUpdate event to the post-Update listeners on the given
instance of this entity. |
abstract void |
deliverPrePersist(X targetEntity)
Delivers the
PrePersist event to the pre-persist listeners on the given
instance of this entity. |
abstract void |
deliverPreRemove(X targetEntity)
Delivers the
PreRemove event to the pre-Remove listeners on the given
instance of this entity. |
abstract void |
deliverPreUpdate(X targetEntity)
Delivers the
PreUpdate event to the pre-Update listeners on the given
instance of this entity. |
X |
fromJson(javax.persistence.EntityManager em,
com.google.gwt.json.client.JSONValue jsonValue)
Converts the given JSONValue, which represents an instance of this entity
type, into the actual instance of this entity type that exists in the given
EntityManager's persistence context.
|
<Y> javax.persistence.metamodel.SingularAttribute<X,Y> |
getDeclaredId(Class<Y> type)
Return the attribute that corresponds to the id attribute
declared by the entity or mapped superclass.
|
<Y> javax.persistence.metamodel.SingularAttribute<X,Y> |
getDeclaredVersion(Class<Y> type)
Return the attribute that corresponds to the version
attribute declared by the entity or mapped superclass.
|
<Y> ErraiSingularAttribute<? super X,Y> |
getId(Class<Y> type)
Return the attribute that corresponds to the id attribute of
the entity or mapped superclass.
|
Set<javax.persistence.metamodel.SingularAttribute<? super X,?>> |
getIdClassAttributes()
Return the attributes corresponding to the id class of the
identifiable type.
|
javax.persistence.metamodel.Type<?> |
getIdType()
Return the type that represents the type of the id.
|
javax.persistence.metamodel.Type.PersistenceType |
getPersistenceType()
Return the persistence type.
|
javax.persistence.metamodel.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> javax.persistence.metamodel.SingularAttribute<? super X,Y> |
getVersion(Class<Y> type)
Return the attribute that corresponds to the version
attribute of the entity or mapped superclass.
|
boolean |
hasSingleIdAttribute()
Whether the identifiable type has a single id attribute.
|
boolean |
hasVersionAttribute()
Whether the identifiable type has a version attribute.
|
String |
toString() |
getAttribute, getAttributes, getCollection, getCollection, getDeclaredAttribute, getDeclaredAttributes, getDeclaredCollection, getDeclaredCollection, getDeclaredList, getDeclaredList, getDeclaredMap, getDeclaredMap, getDeclaredPluralAttributes, getDeclaredSet, getDeclaredSet, getDeclaredSingularAttribute, getDeclaredSingularAttribute, getDeclaredSingularAttributes, getJavaType, getList, getList, getMap, getMap, getPluralAttributes, getSet, getSet, getSingularAttribute, getSingularAttribute, getSingularAttributes, getSubtypes, isSuperclassOf, mergeState, newInstance, parseInlineJson, parsePluralJsonReference, parseSingularJsonReference, toJson
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAttribute, 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, getSingularAttributes
public abstract void deliverPrePersist(X targetEntity)
PrePersist
event to the pre-persist listeners on the given
instance of this entity.targetEntity
- The entity instance to deliver the PrePersist event to.public abstract void deliverPostPersist(X targetEntity)
PostPersist
event to the post-persist listeners on the given
instance of this entity.targetEntity
- The entity instance to deliver the PostPersist event to.public abstract void deliverPreUpdate(X targetEntity)
PreUpdate
event to the pre-Update listeners on the given
instance of this entity.targetEntity
- The entity instance to deliver the PreUpdate event to.public abstract void deliverPostUpdate(X targetEntity)
PostUpdate
event to the post-Update listeners on the given
instance of this entity.targetEntity
- The entity instance to deliver the PostUpdate event to.public abstract void deliverPreRemove(X targetEntity)
PreRemove
event to the pre-Remove listeners on the given
instance of this entity.targetEntity
- The entity instance to deliver the PreRemove event to.public abstract void deliverPostRemove(X targetEntity)
PostRemove
event to the post-Remove listeners on the given
instance of this entity.targetEntity
- The entity instance to deliver the PostRemove event to.public abstract <Y> void deliverPostLoad(X targetEntity)
PostLoad
event to the post-load listeners on the given
instance of this entity.targetEntity
- The entity instance to deliver the PostLoad event to.public X fromJson(javax.persistence.EntityManager em, com.google.gwt.json.client.JSONValue jsonValue)
fromJson
in class ErraiManagedType<X>
em
- The EntityManager that owns this entity type and houses the
persistence context.jsonValue
- A value that represents an instance of this entity type.public <Y> void addAttribute(javax.persistence.metamodel.Attribute<X,Y> attribute)
addAttribute
in class ErraiManagedType<X>
public <Y> ErraiSingularAttribute<? super X,Y> getId(Class<Y> type)
javax.persistence.metamodel.IdentifiableType
getId
in interface javax.persistence.metamodel.IdentifiableType<X>
type
- the type of the represented id attributepublic <Y> javax.persistence.metamodel.SingularAttribute<X,Y> getDeclaredId(Class<Y> type)
javax.persistence.metamodel.IdentifiableType
getDeclaredId
in interface javax.persistence.metamodel.IdentifiableType<X>
type
- the type of the represented declared
id attributepublic <Y> javax.persistence.metamodel.SingularAttribute<? super X,Y> getVersion(Class<Y> type)
javax.persistence.metamodel.IdentifiableType
getVersion
in interface javax.persistence.metamodel.IdentifiableType<X>
type
- the type of the represented version attributepublic <Y> javax.persistence.metamodel.SingularAttribute<X,Y> getDeclaredVersion(Class<Y> type)
javax.persistence.metamodel.IdentifiableType
getDeclaredVersion
in interface javax.persistence.metamodel.IdentifiableType<X>
type
- the type of the represented declared version
attributepublic javax.persistence.metamodel.IdentifiableType<? super X> getSupertype()
javax.persistence.metamodel.IdentifiableType
getSupertype
in interface javax.persistence.metamodel.IdentifiableType<X>
public boolean hasSingleIdAttribute()
javax.persistence.metamodel.IdentifiableType
hasSingleIdAttribute
in interface javax.persistence.metamodel.IdentifiableType<X>
public boolean hasVersionAttribute()
javax.persistence.metamodel.IdentifiableType
hasVersionAttribute
in interface javax.persistence.metamodel.IdentifiableType<X>
public Set<javax.persistence.metamodel.SingularAttribute<? super X,?>> getIdClassAttributes()
javax.persistence.metamodel.IdentifiableType
getIdClassAttributes
in interface javax.persistence.metamodel.IdentifiableType<X>
public javax.persistence.metamodel.Type<?> getIdType()
javax.persistence.metamodel.IdentifiableType
getIdType
in interface javax.persistence.metamodel.IdentifiableType<X>
public javax.persistence.metamodel.Type.PersistenceType getPersistenceType()
javax.persistence.metamodel.Type
getPersistenceType
in interface javax.persistence.metamodel.Type<X>
public String toString()
toString
in class ErraiManagedType<X>
Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.