178 words
javax.persistence.metamodel.Metamodel - JPA interface
javax.persistence.metamodel
Interface Metamodel
Provides access to the metamodel of persistent
entities in the persistence unit.
- Since:
- JPA 2.0
EmbeddableType<X> embeddable(Class<X> cls)
Return the metamodel embeddable type representing the
embeddable class.
- Parameters:
cls- the type of the represented embeddable class
- Returns:
- the metamodel embeddable type
- Throws:
IllegalArgumentException- if not an embeddable class
- Since:
- JPA 2.0
EntityType<X> entity(Class<X> cls)
Return the metamodel entity type representing the entity.
- Parameters:
cls- the type of the represented entity
- Returns:
- the metamodel entity type
- Throws:
IllegalArgumentException- if not an entity
- Since:
- JPA 2.0
Set<EmbeddableType<?>> getEmbeddables()
Return the metamodel embeddable types. Returns empty set
if there are no embeddable types.
- Returns:
- the metamodel embeddable types
- Since:
- JPA 2.0
Set<EntityType<?>> getEntities()
Return the metamodel entity types.
- Returns:
- the metamodel entity types
- Since:
- JPA 2.0
Set<ManagedType<?>> getManagedTypes()
Return the metamodel managed types.
- Returns:
- the metamodel managed types
- Since:
- JPA 2.0
ManagedType<X> managedType(Class<X> cls)
Return the metamodel managed type representing the
entity, mapped superclass, or embeddable class.
- Parameters:
cls- the type of the represented managed class
- Returns:
- the metamodel managed type
- Throws:
IllegalArgumentException- if not a managed class
- Since:
- JPA 2.0
This documentation page is derived (with some adjustments) from the open source JPA 2 RI (EclipseLink)
and is available under the terms of the Eclipse Public License, v. 1.0 and Eclipse Distribution License, v. 1.0.
and is available under the terms of the Eclipse Public License, v. 1.0 and Eclipse Distribution License, v. 1.0.
Object Relational Mapping (ORM) JPA 2 providers include Hibernate, EclipseLink, TopLink, OpenJPA and DataNucleus.
Object DB is not an ORM JPA implementation but an Object Database for Java with built in JPA 2 support.