Package org.hibernate.metamodel.internal
Class MetadataContext
java.lang.Object
org.hibernate.metamodel.internal.MetadataContext
Defines a context for storing information during the building of the
MappingMetamodelImpl.
This contextual information includes data needing to be processed in a second pass as well as cross-references into the built metamodel classes.
At the end of the day, clients are interested in the getEntityTypeMap() and getEmbeddableTypeSet()
results, which represent all the registered entities and
embeddables respectively.
-
Constructor Summary
ConstructorsConstructorDescriptionMetadataContext(JpaMetamodelImplementor jpaMetamodel, MappingMetamodel mappingMetamodel, MetadataImplementor bootMetamodel, JpaStaticMetamodelPopulationSetting jpaStaticMetaModelPopulationSetting, JpaMetamodelPopulationSetting jpaMetaModelPopulationSetting, RuntimeModelCreationContext runtimeModelCreationContext, ClassLoaderService classLoaderService) -
Method Summary
Modifier and TypeMethodDescriptiongetEmbeddableBootDescriptor(EmbeddableDomainType<?> embeddableType) Map<Class<?>, EntityDomainType<?>> Retrieves the java type toEntityTypeImplmap.Map<Class<?>, MappedSuperclassDomainType<?>> getPersistentClassHostingProperties(MappedSuperclassTypeImpl<?> mappedSuperclassType) <J> EmbeddableDomainType<J> locateEmbeddable(Class<J> embeddableClass, Component component) locateEntityType(Class<?> javaType) Given a JavaClass, locate the corresponding JPAEntityType.locateEntityType(PersistentClass persistentClass) Given a HibernatePersistentClass, locate the corresponding JPAEntityTypeimplementation.<E> IdentifiableDomainType<E> locateIdentifiableType(String entityName) Given an entity-name, locate the corresponding JPAEntityType.locateMappedSuperclassType(MappedSuperclass mappedSuperclass) Class<?> metamodelClass(ManagedDomainType<?> managedDomainType) voidpopEntityWorkedOn(PersistentClass persistentClass) voidpushEntityWorkedOn(PersistentClass persistentClass) voidregisterComponentByEmbeddable(EmbeddableDomainType<?> embeddableType, Component bootDescriptor) voidregisterEmbeddableType(EmbeddableDomainType<?> embeddableType, Component bootDescriptor) voidregisterEntityType(PersistentClass persistentClass, EntityTypeImpl<?> entityType) voidregisterMappedSuperclassType(MappedSuperclass mappedSuperclass, MappedSuperclassDomainType<?> mappedSuperclassType) <J> BasicDomainType<J> resolveBasicType(Class<J> javaType) voidwrapUp()
-
Constructor Details
-
MetadataContext
public MetadataContext(JpaMetamodelImplementor jpaMetamodel, MappingMetamodel mappingMetamodel, MetadataImplementor bootMetamodel, JpaStaticMetamodelPopulationSetting jpaStaticMetaModelPopulationSetting, JpaMetamodelPopulationSetting jpaMetaModelPopulationSetting, RuntimeModelCreationContext runtimeModelCreationContext, ClassLoaderService classLoaderService)
-
-
Method Details
-
getRuntimeModelCreationContext
-
getJpaMetamodel
-
getTypeConfiguration
-
getJavaTypeRegistry
-
getEntityTypeMap
Retrieves the java type toEntityTypeImplmap.- Returns:
- The java type to
EntityTypeImplmap.
-
getEmbeddableTypeSet
-
getMappedSuperclassTypeMap
-
registerEntityType
-
registerEmbeddableType
public void registerEmbeddableType(EmbeddableDomainType<?> embeddableType, Component bootDescriptor) -
registerComponentByEmbeddable
public void registerComponentByEmbeddable(EmbeddableDomainType<?> embeddableType, Component bootDescriptor) -
getEmbeddableBootDescriptor
-
registerMappedSuperclassType
public void registerMappedSuperclassType(MappedSuperclass mappedSuperclass, MappedSuperclassDomainType<?> mappedSuperclassType) -
locateEntityType
Given a HibernatePersistentClass, locate the corresponding JPAEntityTypeimplementation. May return null if the givenPersistentClasshas not yet been processed.- Parameters:
persistentClass- The Hibernate (config time) metamodel instance representing an entity.- Returns:
- Tne corresponding JPA
EntityType, or null if not yet processed.
-
locateEntityType
Given a JavaClass, locate the corresponding JPAEntityType. May return null which could mean that no such mapping exists at least at this time.- Parameters:
javaType- The java class.- Returns:
- The corresponding JPA
EntityType, or null.
-
locateIdentifiableType
Given an entity-name, locate the corresponding JPAEntityType. May return null which could means that no such mapping exists at least at this time.- Parameters:
entityName- The entity-name.- Returns:
- The corresponding JPA
EntityType, or null.
-
getIdentifiableTypesByName
-
wrapUp
public void wrapUp() -
metamodelClass
-
locateMappedSuperclassType
-
pushEntityWorkedOn
-
popEntityWorkedOn
-
getPersistentClassHostingProperties
public PersistentClass getPersistentClassHostingProperties(MappedSuperclassTypeImpl<?> mappedSuperclassType) -
getUnusedMappedSuperclasses
-
resolveBasicType
-
locateEmbeddable
-