public class MetamodelImpl
extends java.lang.Object
implements javax.persistence.metamodel.Metamodel, java.io.Serializable
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.
Metamodel
,
Serialized FormModifier and Type | Field and Description |
---|---|
static java.lang.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
|
Constructor and Description |
---|
MetamodelImpl(AbstractSession session) |
MetamodelImpl(javax.persistence.EntityManager em) |
MetamodelImpl(javax.persistence.EntityManagerFactory emf) |
MetamodelImpl(EntityManagerSetupImpl emSetupImpl)
INTERNAL:
|
Modifier and Type | Method and Description |
---|---|
<X> javax.persistence.metamodel.EmbeddableType<X> |
embeddable(java.lang.Class<X> clazz)
Return the metamodel embeddable type representing the
embeddable class.
|
<X> javax.persistence.metamodel.EntityType<X> |
entity(java.lang.Class<X> clazz)
Return the metamodel entity type representing the entity.
|
java.util.List<javax.persistence.metamodel.Attribute> |
getAllManagedTypeAttributes()
INTERNAL:
Return a List of all attributes for all ManagedTypes.
|
java.util.Set<javax.persistence.metamodel.EmbeddableType<?>> |
getEmbeddables()
Return the metamodel embeddable types.
|
java.util.Set<javax.persistence.metamodel.EntityType<?>> |
getEntities()
Return the metamodel entity types.
|
java.util.Set<javax.persistence.metamodel.ManagedType<?>> |
getManagedTypes()
Return the metamodel managed types.
|
java.util.Map<java.lang.String,ManagedTypeImpl<?>> |
getManagedTypesMap()
Return the metamodel managed types map.
|
java.util.Set<MappedSuperclassTypeImpl<?>> |
getMappedSuperclasses()
INTERNAL:
Return the Set of MappedSuperclassType objects
|
Project |
getProject()
INTERNAL:
Return the core API Project associated with the DatabaseSession
that is associated with this Metamodel
|
<X> TypeImpl<X> |
getType(java.lang.Class<X> javaClass)
INTERNAL:
Return a Type representation of a java Class for use by the Metamodel Attributes.
|
java.util.Map<java.lang.String,TypeImpl<?>> |
getTypes()
INTERNAL:
Return the Map of types on this metamodel.
|
void |
initialize(java.lang.ClassLoader classLoader)
INTERNAL:
Initialize the JPA metamodel that wraps the EclipseLink JPA metadata created descriptors.
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. |
boolean |
isInitialized() |
<X> javax.persistence.metamodel.ManagedType<X> |
managedType(java.lang.Class<X> clazz)
Return the metamodel managed type representing the
entity, mapped superclass, or embeddable class.
|
void |
printAllTypes()
INTERNAL:
Print out all the Type attributes in the Metamodel
|
java.lang.String |
toString()
INTERNAL:
Return the string representation of the receiver.
|
public static final java.lang.Class DEFAULT_ELEMENT_TYPE_FOR_UNSUPPORTED_MAPPINGS
public MetamodelImpl(AbstractSession session)
public MetamodelImpl(javax.persistence.EntityManager em)
public MetamodelImpl(javax.persistence.EntityManagerFactory emf)
public MetamodelImpl(EntityManagerSetupImpl emSetupImpl)
emSetupImpl
- public <X> javax.persistence.metamodel.EmbeddableType<X> embeddable(java.lang.Class<X> clazz)
embeddable
in interface javax.persistence.metamodel.Metamodel
clazz
- the type of the represented embeddable classjava.lang.IllegalArgumentException
- if not an embeddable classpublic <X> javax.persistence.metamodel.EntityType<X> entity(java.lang.Class<X> clazz)
entity
in interface javax.persistence.metamodel.Metamodel
clazz
- the type of the represented entityjava.lang.IllegalArgumentException
- if not an entitypublic java.util.List<javax.persistence.metamodel.Attribute> getAllManagedTypeAttributes()
public java.util.Set<javax.persistence.metamodel.EmbeddableType<?>> getEmbeddables()
getEmbeddables
in interface javax.persistence.metamodel.Metamodel
public java.util.Set<javax.persistence.metamodel.EntityType<?>> getEntities()
getEntities
in interface javax.persistence.metamodel.Metamodel
public java.util.Map<java.lang.String,ManagedTypeImpl<?>> getManagedTypesMap()
public java.util.Set<javax.persistence.metamodel.ManagedType<?>> getManagedTypes()
getManagedTypes
in interface javax.persistence.metamodel.Metamodel
public java.util.Set<MappedSuperclassTypeImpl<?>> getMappedSuperclasses()
public Project getProject()
public <X> TypeImpl<X> getType(java.lang.Class<X> javaClass)
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.
javaClass
- public java.util.Map<java.lang.String,TypeImpl<?>> getTypes()
public boolean isInitialized()
public void initialize(java.lang.ClassLoader classLoader)
public <X> javax.persistence.metamodel.ManagedType<X> managedType(java.lang.Class<X> clazz)
managedType
in interface javax.persistence.metamodel.Metamodel
clazz
- the type of the represented managed classjava.lang.IllegalArgumentException
- if not a managed classpublic void printAllTypes()
public java.lang.String toString()
toString
in class java.lang.Object
EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference