Jakarta Persistence (JPA) Interface

jakarta.persistence.metamodel.Metamodel


Provides access to the metamodel of persistent entities in the persistence unit.
Since:
Jakarta Persistence (JPA) 2.0

Public Instance Methods

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:
Jakarta Persistence (JPA) 1.0
EntityType<?> entity(String entityName)
Return the metamodel entity type representing the entity.
Parameters:
entityName - the name of the represented entity
Returns:
the metamodel entity type.
Throws:
IllegalArgumentException - if not an entity.
See Also:
Since:
Jakarta Persistence (JPA) 3.2
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:
Jakarta Persistence (JPA) 1.0
Return the metamodel embeddable types.
Returns am empty set if there are no embeddable types.
Returns:
the metamodel embeddable types.
Since:
Jakarta Persistence (JPA) 1.0
Return the metamodel entity types.
Returns:
the metamodel entity types.
Since:
Jakarta Persistence (JPA) 1.0
Return the metamodel managed types.
Returns:
the metamodel managed types.
Since:
Jakarta Persistence (JPA) 1.0
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:
Jakarta Persistence (JPA) 1.0