EclipseLink 2.0.0_ 2.0.0.v20090424-r4050 API Reference

javax.persistence.metamodel
Interface Metamodel


public interface Metamodel

Provides access to the metamodel of persistent entities in the persistence unit.


Method Summary
<X> Embeddable<X>
embeddable(java.lang.Class<X> cls)
          Return the metamodel embeddable type representing the embeddable type.
<X> Entity<X>
entity(java.lang.Class<X> cls)
          Return the metamodel entity representing the entity type.
 java.util.Set<Embeddable<?>> getEmbeddables()
          Return the metamodel embeddable types.
 java.util.Set<Entity<?>> getEntities()
          Return the metamodel entity types.
 java.util.Set<ManagedType<?>> getManagedTypes()
          Return the metamodel managed types.
<X> ManagedType<X>
type(java.lang.Class<X> cls)
          Return the metamodel managed type representing the entity, mapped superclass, or embeddable type.
 

Method Detail

entity

<X> Entity<X> entity(java.lang.Class<X> cls)
Return the metamodel entity representing the entity type.

Parameters:
cls - the type of the represented entity
Returns:
the metamodel entity
Throws:
java.lang.IllegalArgumentException - if not an entity

type

<X> ManagedType<X> type(java.lang.Class<X> cls)
Return the metamodel managed type representing the entity, mapped superclass, or embeddable type.

Parameters:
cls - the type of the represented managed class
Returns:
the metamodel managed type
Throws:
java.lang.IllegalArgumentException - if not a managed class

embeddable

<X> Embeddable<X> embeddable(java.lang.Class<X> cls)
Return the metamodel embeddable type representing the embeddable type.

Parameters:
cls - the type of the represented embeddable class
Returns:
the metamodel embeddable type
Throws:
java.lang.IllegalArgumentException - if not an embeddable class

getManagedTypes

java.util.Set<ManagedType<?>> getManagedTypes()
Return the metamodel managed types.

Returns:
the metamodel managed types

getEntities

java.util.Set<Entity<?>> getEntities()
Return the metamodel entity types.

Returns:
the metamodel entity types

getEmbeddables

java.util.Set<Embeddable<?>> getEmbeddables()
Return the metamodel embeddable types.

Returns:
the metamodel embeddable types

EclipseLink 2.0.0_ 2.0.0.v20090424-r4050 API Reference