|
Errai 3.0.1-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.errai.jpa.client.local.ErraiManagedType<X>
org.jboss.errai.jpa.client.local.ErraiIdentifiableType<X>
X
- The actual type described by this metatype.public abstract class ErraiIdentifiableType<X>
Errai implementation of the JPA IdentifiableType metamodel interface. Specializes ManagedType by adding properties related to ID and version attributes.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface javax.persistence.metamodel.Type |
---|
javax.persistence.metamodel.Type.PersistenceType |
Field Summary |
---|
Fields inherited from class org.jboss.errai.jpa.client.local.ErraiManagedType |
---|
javaType |
Constructor Summary | |
---|---|
ErraiIdentifiableType(Class<X> javaType)
|
Method Summary | ||
---|---|---|
|
addAttribute(javax.persistence.metamodel.Attribute<X,Y> attribute)
|
|
abstract
|
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. |
|
|
getDeclaredId(Class<Y> type)
Return the attribute that corresponds to the id attribute declared by the entity or mapped superclass. |
|
|
getDeclaredVersion(Class<Y> type)
Return the attribute that corresponds to the version attribute declared by the entity or mapped superclass. |
|
|
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. |
|
|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javax.persistence.metamodel.ManagedType |
---|
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 |
Methods inherited from interface javax.persistence.metamodel.Type |
---|
getJavaType |
Constructor Detail |
---|
public ErraiIdentifiableType(Class<X> javaType)
Method Detail |
---|
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 attribute
public <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 attribute
public <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 attribute
public <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
attribute
public 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>
|
Errai 3.0.1-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |