Package org.hibernate.boot
Interface Metadata
- All Superinterfaces:
Mapping
- All Known Subinterfaces:
InFlightMetadataCollector
,MetadataImplementor
- All Known Implementing Classes:
AbstractDelegatingMetadata
,InFlightMetadataCollectorImpl
,MetadataImpl
Represents the ORM model as determined by aggregating the provided mapping sources.
An instance may be obtained by calling
MetadataSources.buildMetadata()
.- Since:
- 5.0
-
Method Summary
Modifier and TypeMethodDescriptionShort-hand form of building aSessionFactory
through the builder without any additional option overrides.getCollectionBinding
(String role) Retrieves the collection mapping metadata for the given collection role.Retrieves the Collection metadata representation for all known collections.All of the known model contributorsRetrieve the database model.getEntityBinding
(String entityName) Retrieves the PersistentClass entity mapping metadata representation for the given entity name.Retrieves the PersistentClass entity metadata representation for all known entities.getFetchProfile
(String name) getFilterDefinition
(String name) Retrieves a filter definition by name.Retrieves the complete map of filter definitions.getIdentifierGenerator
(String name) Retrieves all defined imports (class renames).getNamedEntityGraph
(String name) Retrieve named query metadata by name.Retrieve named SQL query metadata.Retrieve named procedure metadata.getResultSetMapping
(String name) Retrieve the metadata for a named SQL result set mapping.Get the builder forSessionFactory
instances based on this metamodel.getTypeDefinition
(String typeName) Retrieve a type definition by name.getUUID()
Gets theUUID
for this metamodel.void
visitNamedHqlQueryDefinitions
(Consumer<NamedHqlQueryDefinition<?>> definitionConsumer) Visit all named HQL query definitionsvoid
visitNamedNativeQueryDefinitions
(Consumer<NamedNativeQueryDefinition<?>> definitionConsumer) Visit all named native query definitionsvoid
visitNamedProcedureCallDefinition
(Consumer<NamedProcedureCallDefinition> definitionConsumer) Visit all named callable query definitionsvoid
visitNamedResultSetMappingDefinition
(Consumer<NamedResultSetMappingDescriptor> definitionConsumer) Visit all named SQL result set mapping definitionsMethods inherited from interface org.hibernate.engine.spi.Mapping
getIdentifierPropertyName, getIdentifierType, getReferencedPropertyType
-
Method Details
-
getSessionFactoryBuilder
SessionFactoryBuilder getSessionFactoryBuilder()Get the builder forSessionFactory
instances based on this metamodel.- Returns:
- The builder for
SessionFactory
instances.
-
buildSessionFactory
SessionFactory buildSessionFactory()Short-hand form of building aSessionFactory
through the builder without any additional option overrides.- Returns:
- THe built SessionFactory.
-
getUUID
UUID getUUID()Gets theUUID
for this metamodel.- Returns:
- the UUID.
-
getDatabase
Database getDatabase()Retrieve the database model.- Returns:
- The database model.
-
getEntityBindings
Collection<PersistentClass> getEntityBindings()Retrieves the PersistentClass entity metadata representation for all known entities. Returned collection is immutable- Returns:
- All PersistentClass representations.
-
getEntityBinding
Retrieves the PersistentClass entity mapping metadata representation for the given entity name.- Parameters:
entityName
- The entity name for which to retrieve the metadata.- Returns:
- The entity mapping metadata, or
null
if no matching entity found.
-
getCollectionBindings
Collection<Collection> getCollectionBindings()Retrieves the Collection metadata representation for all known collections. Returned collection is immutable- Returns:
- All Collection representations.
-
getCollectionBinding
Retrieves the collection mapping metadata for the given collection role.- Parameters:
role
- The collection role for which to retrieve the metadata.- Returns:
- The collection mapping metadata, or
null
if no matching collection found.
-
getImports
Retrieves all defined imports (class renames).- Returns:
- All imports
-
getNamedHqlQueryMapping
Retrieve named query metadata by name.- Returns:
- The named query metadata, or
null
.
-
visitNamedHqlQueryDefinitions
Visit all named HQL query definitions -
getNamedNativeQueryMapping
Retrieve named SQL query metadata.- Returns:
- The named query metadata, or
null
-
visitNamedNativeQueryDefinitions
Visit all named native query definitions -
getNamedProcedureCallMapping
Retrieve named procedure metadata.- Returns:
- The named procedure metadata, or
null
-
visitNamedProcedureCallDefinition
Visit all named callable query definitions -
getResultSetMapping
Retrieve the metadata for a named SQL result set mapping.- Parameters:
name
- The mapping name.- Returns:
- The named result set mapping metadata, or
null
if none found.
-
visitNamedResultSetMappingDefinition
void visitNamedResultSetMappingDefinition(Consumer<NamedResultSetMappingDescriptor> definitionConsumer) Visit all named SQL result set mapping definitions -
getTypeDefinition
Retrieve a type definition by name.- Returns:
- The named type definition, or
null
-
getFilterDefinitions
Map<String,FilterDefinition> getFilterDefinitions()Retrieves the complete map of filter definitions. Returned map is immutable- Returns:
- The filter definition map.
-
getFilterDefinition
Retrieves a filter definition by name.- Parameters:
name
- The name of the filter definition to retrieve .- Returns:
- The filter definition, or
null
.
-
getFetchProfile
-
getFetchProfiles
Collection<FetchProfile> getFetchProfiles() -
getNamedEntityGraph
-
getNamedEntityGraphs
Map<String,NamedEntityGraphDefinition> getNamedEntityGraphs() -
getIdentifierGenerator
-
collectTableMappings
Collection<Table> collectTableMappings() -
getSqlFunctionMap
Map<String,SqmFunctionDescriptor> getSqlFunctionMap() -
getContributors
All of the known model contributors
-