|
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.ErraiMetamodel
public class ErraiMetamodel
Trivial implementation of the JPA Metamodel class. This class is normally instantiated and populated by generated code in ErraiEntityManager.
Instances of this class have two distinct lifecycle phases: when first
constructed, the package-private methods addEntityType(EntityType)
and friends may be called to add new entity types. This is normally done from
generated code, but test code can also do this manually. Once
freeze()
has been called, the instance is "frozen." When frozen, all
the Metamodel interface methods operate properly, but the addXXX() methods
throw exceptions when called.
Constructor Summary | |
---|---|
ErraiMetamodel()
|
Method Summary | ||
---|---|---|
|
embeddable(Class<X> cls)
Return the metamodel embeddable type representing the embeddable class. |
|
|
entity(Class<X> cls)
Return the metamodel entity type representing the entity. |
|
|
entity(String className)
Retrieves an ErraiEntityType by name rather than class reference. |
|
Set<javax.persistence.metamodel.EmbeddableType<?>> |
getEmbeddables()
Return the metamodel embeddable types. |
|
Set<javax.persistence.metamodel.EntityType<?>> |
getEntities()
Return the metamodel entity types. |
|
Set<javax.persistence.metamodel.ManagedType<?>> |
getManagedTypes()
Return the metamodel managed types. |
|
|
managedType(Class<X> cls)
Return the metamodel managed type representing the entity, mapped superclass, or embeddable class. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ErraiMetamodel()
Method Detail |
---|
public <X> ErraiEntityType<X> entity(String className)
className
- The fully-qualified class name of the entity type to retrieve (as
returned by Class.getName()
). Null not permitted.
IllegalArgumentException
- if the given class name is not an known entity type.public <X> ErraiEntityType<X> entity(Class<X> cls)
javax.persistence.metamodel.Metamodel
entity
in interface javax.persistence.metamodel.Metamodel
cls
- the type of the represented entity
public <X> javax.persistence.metamodel.ManagedType<X> managedType(Class<X> cls)
javax.persistence.metamodel.Metamodel
managedType
in interface javax.persistence.metamodel.Metamodel
cls
- the type of the represented managed class
public <X> javax.persistence.metamodel.EmbeddableType<X> embeddable(Class<X> cls)
javax.persistence.metamodel.Metamodel
embeddable
in interface javax.persistence.metamodel.Metamodel
cls
- the type of the represented embeddable class
public Set<javax.persistence.metamodel.ManagedType<?>> getManagedTypes()
javax.persistence.metamodel.Metamodel
getManagedTypes
in interface javax.persistence.metamodel.Metamodel
public Set<javax.persistence.metamodel.EntityType<?>> getEntities()
javax.persistence.metamodel.Metamodel
getEntities
in interface javax.persistence.metamodel.Metamodel
public Set<javax.persistence.metamodel.EmbeddableType<?>> getEmbeddables()
javax.persistence.metamodel.Metamodel
getEmbeddables
in interface javax.persistence.metamodel.Metamodel
|
Errai 3.0.1-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |