Package org.hibernate.metamodel
Interface MappingMetamodel
- All Known Subinterfaces:
MappingMetamodelImplementor,MetamodelImplementor
- All Known Implementing Classes:
MappingMetamodelImpl
Access to information about the runtime relational O/R mapping model.
-
Method Summary
Modifier and TypeMethodDescription<T> voidaddNamedEntityGraph(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) voidVisit the mapping descriptors for all collections defined in the modelvoidVisit all entity mapping descriptors defined in the modelvoidforEachNamedGraph(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) TheTypeConfigurationthis metamodel is associated withbooleanisEntityClass(Class<?> entityJavaType) locateEntityDescriptor(Class<?> byClass) Locate an entity mapping descriptor by Class.default EntityPersisterlocateEntityPersister(Class<?> byClass) Deprecated.locateEntityPersister(String byName) Deprecated.- usegetEntityDescriptor(String)insteadresolveMappingExpressible(SqmExpressible<?> sqmExpressible, Function<NavigablePath, TableGroup> tableGroupLocator) <T> BindableType<T>resolveQueryParameterType(Class<T> javaType) Given a Java type, determine the corresponding BindableType to use implicitly
-
Method Details
-
getTypeConfiguration
TypeConfiguration getTypeConfiguration()TheTypeConfigurationthis metamodel is associated with -
resolveMappingExpressible
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
Stream<EntityPersister> streamEntityDescriptors() -
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
nullrather than throwing exception
-
findEntityDescriptor
Find an entity mapping descriptor based on its Class.- API Note:
- Returns
nullrather than throwing exception
-
isEntityClass
-
locateEntityDescriptor
Locate 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
-
locateEntityPersister
Deprecated.uselocateEntityDescriptor(Class)instead -
locateEntityPersister
Deprecated.- usegetEntityDescriptor(String)insteadLocate the entity persister by name.- Returns:
- The located EntityPersister, never
null - Throws:
UnknownEntityTypeException- If a matching EntityPersister cannot be located
-
getImportedName
-
forEachCollectionDescriptor
Visit the mapping descriptors for all collections defined in the model -
streamCollectionDescriptors
Stream<CollectionPersister> streamCollectionDescriptors() -
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. Returnsnullif the role does not refer to a collection -
findNamedGraph
-
addNamedEntityGraph
-
forEachNamedGraph
-
defaultGraph
-
defaultGraph
-
defaultGraph
-
defaultGraph
-
findRootGraphsForType
-
findRootGraphsForType
-
findRootGraphsForType
-
locateEntityDescriptor(Class)instead