Package org.hibernate.metamodel
Interface MappingMetamodel
- All Superinterfaces:
Metamodel
- All Known Subinterfaces:
MappingMetamodelImplementor
- All Known Implementing Classes:
MappingMetamodelImpl
Access to information about the runtime relational O/R mapping model.
-
Method Summary
Modifier and TypeMethodDescription<T> void
addNamedEntityGraph
(String graphName, RootGraphImplementor<T> entityGraph) RootGraph<?>
defaultGraph
(Class<?> entityJavaType) RootGraph<?>
defaultGraph
(String entityName) RootGraph<?>
defaultGraph
(EntityDomainType<?> entityDomainType) RootGraph<?>
defaultGraph
(EntityPersister entityDescriptor) Find a collection mapping descriptor based on its role.Find a collection mapping descriptor based on its role.findEntityDescriptor
(Class<?> entityJavaType) Find an entity mapping descriptor based on its Class.findEntityDescriptor
(String entityName) Find an entity mapping descriptor based on its Hibernate entity-name.RootGraph<?>
findNamedGraph
(String name) findRootGraphsForType
(Class<?> baseEntityJavaType) findRootGraphsForType
(String baseEntityName) findRootGraphsForType
(EntityPersister baseEntityDescriptor) void
Visit the mapping descriptors for all collections defined in the modelvoid
Visit all entity mapping descriptors defined in the modelvoid
forEachNamedGraph
(Consumer<RootGraph<?>> action) Get a collection mapping descriptor based on its roleGet a collection mapping descriptor based on its roleGet an EmbeddableMappingType based on its NavigableRole.getEntityDescriptor
(Class<?> entityJavaType) Get an entity mapping descriptor based on its Class.getEntityDescriptor
(String entityName) Get an entity mapping descriptor based on its Hibernate entity-nameGet an entity mapping descriptor based on its NavigableRole.getImportedName
(String name) TheTypeConfiguration
this metamodel is associated withboolean
isEntityClass
(Class<?> entityJavaType) locateEntityDescriptor
(Class<?> byClass) Deprecated, for removal: This API element is subject to removal in a future version.No longer usedresolveMappingExpressible
(SqmExpressible<?> sqmExpressible, Function<NavigablePath, TableGroup> tableGroupLocator) <T> BindableType<T>
resolveQueryParameterType
(Class<T> javaType) Given a Java type, determine the corresponding BindableType to use implicitlyDeprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Methods inherited from interface jakarta.persistence.metamodel.Metamodel
embeddable, entity, entity, getEmbeddables, getEntities, getManagedTypes, managedType
-
Method Details
-
getTypeConfiguration
TypeConfiguration getTypeConfiguration()TheTypeConfiguration
this metamodel is associated with -
resolveMappingExpressible
@Internal MappingModelExpressible<?> resolveMappingExpressible(SqmExpressible<?> sqmExpressible, Function<NavigablePath, TableGroup> tableGroupLocator) -
resolveQueryParameterType
Given a Java type, determine the corresponding BindableType to use implicitly -
forEachEntityDescriptor
Visit all entity mapping descriptors defined in the model -
streamEntityDescriptors
Deprecated, for removal: This API element is subject to removal in a future version. -
getEntityDescriptor
Get an entity mapping descriptor based on its Hibernate entity-name- Throws:
IllegalArgumentException
- if the name does not refer to an entity- See Also:
-
getEntityDescriptor
Get an entity mapping descriptor based on its Class.- Throws:
IllegalArgumentException
- if the name does not refer to an entity- See Also:
-
findEntityDescriptor
Find an entity mapping descriptor based on its Hibernate entity-name.- API Note:
- Returns
null
rather than throwing exception
-
findEntityDescriptor
Find an entity mapping descriptor based on its Class.- API Note:
- Returns
null
rather than throwing exception
-
isEntityClass
-
locateEntityDescriptor
Deprecated, for removal: This API element is subject to removal in a future version.No longer usedLocate an entity mapping descriptor by Class. The passed Class might refer to either the entity Class directly, or it might name a proxy interface for the entity. This method accounts for both, preferring the direct entity name.- Throws:
UnknownEntityTypeException
- If a matching EntityPersister cannot be located
-
getImportedName
-
forEachCollectionDescriptor
Visit the mapping descriptors for all collections defined in the model -
streamCollectionDescriptors
Deprecated, for removal: This API element is subject to removal in a future version. -
getCollectionDescriptor
Get a collection mapping descriptor based on its role- Throws:
IllegalArgumentException
- if the role does not refer to a collection- See Also:
-
findCollectionDescriptor
Find a collection mapping descriptor based on its role. Returnsnull
if the role does not refer to a collection -
findNamedGraph
-
addNamedEntityGraph
-
forEachNamedGraph
-
defaultGraph
-
defaultGraph
-
defaultGraph
-
defaultGraph
-
findRootGraphsForType
-
findRootGraphsForType
-
findRootGraphsForType
-