Purpose: Provides the implementation for the Metamodel interface of the JPA 2.0 Metamodel API (part of the JSR-317 EJB 3.1 Criteria API)
Description: Provides access to the metamodel of persistent Entities, MappedSuperclasses, Embeddables, ManagedTypes and Types in the persistence unit.
Note
Since the types Map is lazy-loaded with key:value pairs - the designer and especially the user must realized that a particular BasicType may not be in the Map until it is referenced.
jakarta.persistence.metamodel.Metamodel
| Modifier and Type | Field and Description |
|---|---|
| public static final Class | DEFAULT_ELEMENT_TYPE_FOR_UNSUPPORTED_MAPPINGS
Default elementType Class when we the type cannot be determined for unsupported mappings such as Transformation and VariableOneToOne |
| private Map | embeddables
The Map of embeddables in this metamodel keyed on Class |
| private Map | entities
The Map of entities in this metamodel keyed on Class |
| private boolean | isInitialized
maintains initialization state to avoid extra work in calls to initialize |
| private Map | managedTypes
The Map of managed types (Entity, Embeddable and MappedSuperclass) in this metamodel keyed on Class |
| private Set | mappedSuperclasses
The Set of MappedSuperclassTypes in this metamodel |
| private static final long | serialVersionUID
Item 54: DI 89: explicit UID will avoid performance hit runtime generation of one |
| private AbstractSession | session
The EclipseLink Session associated with this Metamodel implementation that contains all our descriptors with mappings |
| private Map | types
The Map of types (Entity, Embeddable, MappedSuperclass and Basic - essentially Basic + managedTypes) in this metamodel keyed on Class |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public <X> EmbeddableType | Returns: the metamodel embeddable typethe type of the represented embeddable class clazz)Implements jakarta. |
| public <X> EntityType | Returns: the metamodel entity typethe type of the represented entity clazz)Implements jakarta. |
| private void | |
| public List | |
| public Set | Returns: the metamodel embeddable typesImplements jakarta. |
| public Set | Returns: the metamodel entity typesImplements jakarta. |
| public Set | Returns: the metamodel managed typesImplements jakarta. |
| public Map | |
| public Set | |
| public Project | getProject()
INTERNAL: Return the core API Project associated with the DatabaseSession that is associated with this Metamodel |
| protected AbstractSession | |
| public <X> TypeImpl | |
| public Map | |
| protected boolean | hasMappedSuperclass(String qualifiedClassNameKeyString)
INTERNAL: Return whether there is a descriptor that is keyed by the supplied class name. |
| public void | initialize(ClassLoader classLoader)
INTERNAL: Initialize the JPA metamodel that wraps the EclipseLink JPA metadata created descriptors. |
| public boolean | |
| public <X> ManagedType | Returns: the metamodel managed typethe type of the represented managed class clazz)Implements jakarta. |
| private void | |
| public void | |
| private boolean | |
| public String | toString()
Overrides java. |
| DEFAULT_ELEMENT_TYPE_FOR_UNSUPPORTED_MAPPINGS | back to summary |
|---|---|
| public static final Class<Object> DEFAULT_ELEMENT_TYPE_FOR_UNSUPPORTED_MAPPINGS Default elementType Class when we the type cannot be determined for unsupported mappings such as Transformation and VariableOneToOne | |
| embeddables | back to summary |
|---|---|
| private Map<String, EmbeddableTypeImpl<?>> embeddables The Map of embeddables in this metamodel keyed on Class | |
| entities | back to summary |
|---|---|
| private Map<String, EntityTypeImpl<?>> entities The Map of entities in this metamodel keyed on Class | |
| isInitialized | back to summary |
|---|---|
| private boolean isInitialized maintains initialization state to avoid extra work in calls to initialize | |
| managedTypes | back to summary |
|---|---|
| private Map<String, ManagedTypeImpl<?>> managedTypes The Map of managed types (Entity, Embeddable and MappedSuperclass) in this metamodel keyed on Class | |
| mappedSuperclasses | back to summary |
|---|---|
| private Set<MappedSuperclassTypeImpl<?>> mappedSuperclasses The Set of MappedSuperclassTypes in this metamodel | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Item 54: DI 89: explicit UID will avoid performance hit runtime generation of one | |
| session | back to summary |
|---|---|
| private AbstractSession session The EclipseLink Session associated with this Metamodel implementation that contains all our descriptors with mappings | |
| types | back to summary |
|---|---|
| private Map<String, TypeImpl<?>> types The Map of types (Entity, Embeddable, MappedSuperclass and Basic - essentially Basic + managedTypes) in this metamodel keyed on Class | |
| MetamodelImpl | back to summary |
|---|---|
| public MetamodelImpl(AbstractSession session) | |
| MetamodelImpl | back to summary |
|---|---|
| public MetamodelImpl(EntityManager em) | |
| MetamodelImpl | back to summary |
|---|---|
| public MetamodelImpl(EntityManagerFactory emf) | |
| MetamodelImpl | back to summary |
|---|---|
| public MetamodelImpl(EntityManagerSetupImpl emSetupImpl) INTERNAL: | |
| embeddable | back to summary |
|---|---|
| public <X> EmbeddableType Implements jakarta. Return the metamodel embeddable type representing the embeddable class.
| |
| entity | back to summary |
|---|---|
| public <X> EntityType Implements jakarta. Return the metamodel entity type representing the entity.
| |
| entityEmbeddableManagedTypeNotFound | back to summary |
|---|---|
| private void entityEmbeddableManagedTypeNotFound(Map<K, V> typeMap, Object aType, Class<?> clazz, String metamodelType, String metamodelTypeName) INTERNAL: This function will warn the user and/or throw an IllegalArgumentException if the type is not found in the metamodel. There is a chance that the entire metamodel is empty because the model was not found during entity search. This is usually due to the case where an expected managed persistence unit in a Java EE environment is actually processed as a Java SE (unmanaged) persistence unit. This may occur on certain configurations of Spring or on Java EE 6 Web Profile implementations that are not in compliance with the specification. See http://bugs.eclipse.org/338837 | |
| getAllManagedTypeAttributes | back to summary |
|---|---|
| public List INTERNAL: Return a List of all attributes for all ManagedTypes. | |
| getEmbeddables | back to summary |
|---|---|
| public Set Implements jakarta. Return the metamodel embeddable types.
| |
| getEntities | back to summary |
|---|---|
| public Set Implements jakarta. Return the metamodel entity types.
| |
| getManagedTypes | back to summary |
|---|---|
| public Set Implements jakarta. Return the metamodel managed types.
| |
| getManagedTypesMap | back to summary |
|---|---|
| public Map Return the metamodel managed types map. | |
| getMappedSuperclasses | back to summary |
|---|---|
| public Set INTERNAL: Return the Set of MappedSuperclassType objects | |
| getProject | back to summary |
|---|---|
| public Project getProject() INTERNAL: Return the core API Project associated with the DatabaseSession that is associated with this Metamodel | |
| getSession | back to summary |
|---|---|
| protected AbstractSession getSession() INTERNAL: Return the DatabaseSession associated with this Metamodel | |
| getType | back to summary |
|---|---|
| public <X> TypeImpl INTERNAL: Return a Type representation of a java Class for use by the Metamodel Attributes. If a type does not yet exist - one will be created and added to the Metamodel - this usually only for Basic types. This function will handle all Metamodel defined and core java classes. | |
| getTypes | back to summary |
|---|---|
| public Map INTERNAL: Return the Map of types on this metamodel. This includes all Entity, MappedSuperclass, Embeddable and Basic types | |
| hasMappedSuperclass | back to summary |
|---|---|
| protected boolean hasMappedSuperclass(String qualifiedClassNameKeyString) INTERNAL: Return whether there is a descriptor that is keyed by the supplied class name. Referenced by ManagedTypeImpl.create() | |
| initialize | back to summary |
|---|---|
| public void initialize(ClassLoader classLoader) INTERNAL:
Initialize the JPA metamodel that wraps the EclipseLink JPA metadata created descriptors. | |
| isInitialized | back to summary |
|---|---|
| public boolean isInitialized() | |
| managedType | back to summary |
|---|---|
| public <X> ManagedType Implements jakarta. Return the metamodel managed type representing the entity, mapped superclass, or embeddable class.
| |
| preInitialize | back to summary |
|---|---|
| private void preInitialize() INTERNAL: First phase of metamodel intialization. Builds a list of the classes in the metamodel and stores them in appropriate lists indexed by the classname. We index by classname to avoid having to load classes at this phase of initialization | |
| printAllTypes | back to summary |
|---|---|
| public void printAllTypes() INTERNAL: Print out all the Type attributes in the Metamodel | |
| putType | back to summary |
|---|---|
| private boolean putType(String javaClassKey, TypeImpl<X> typeValue) INTERNAL:
This function is a wrapper around a Map.put(K,V) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. INTERNAL: Return the string representation of the receiver.
| |