接口 Metadata
-
- 所有超级接口:
Mapping
- 所有已知子接口:
InFlightMetadataCollector,MetadataImplementor
public interface Metadata extends Mapping
Represents the ORM model as determined from all provided mapping sources. NOTE : for the time being this is essentially a copy of the legacy Mappings contract, split between reading the mapping information exposed here and collecting it via InFlightMetadataCollector- 从以下版本开始:
- 5.0
- 作者:
- Steve Ebersole
-
-
方法概要
-
从接口继承的方法 org.hibernate.engine.spi.Mapping
getIdentifierGeneratorFactory, getIdentifierPropertyName, getIdentifierType, getReferencedPropertyType
-
-
-
-
方法详细资料
-
getSessionFactoryBuilder
SessionFactoryBuilder getSessionFactoryBuilder()
Get the builder forSessionFactoryinstances based on this metamodel.- 返回:
- The builder for
SessionFactoryinstances.
-
buildSessionFactory
SessionFactory buildSessionFactory()
Short-hand form of building aSessionFactorythrough the builder without any additional option overrides.- 返回:
- THe built SessionFactory.
-
getDatabase
Database getDatabase()
Retrieve the database model.- 返回:
- The database model.
-
getEntityBindings
Collection<PersistentClass> getEntityBindings()
Retrieves the PersistentClass entity metadata representation for all known entities. Returned collection is immutable- 返回:
- All PersistentClass representations.
-
getEntityBinding
PersistentClass getEntityBinding(String entityName)
Retrieves the PersistentClass entity mapping metadata representation for the given entity name.- 参数:
entityName- The entity name for which to retrieve the metadata.- 返回:
- The entity mapping metadata, or
nullif no matching entity found.
-
getCollectionBindings
Collection<Collection> getCollectionBindings()
Retrieves the Collection metadata representation for all known collections. Returned collection is immutable- 返回:
- All Collection representations.
-
getCollectionBinding
Collection getCollectionBinding(String role)
Retrieves the collection mapping metadata for the given collection role.- 参数:
role- The collection role for which to retrieve the metadata.- 返回:
- The collection mapping metadata, or
nullif no matching collection found.
-
getImports
Map<String,String> getImports()
Retrieves all defined imports (class renames).- 返回:
- All imports
-
getNamedQueryDefinition
NamedQueryDefinition getNamedQueryDefinition(String name)
Retrieve named query metadata by name.- 参数:
name- The query name- 返回:
- The named query metadata, or
null.
-
getNamedQueryDefinitions
Collection<NamedQueryDefinition> getNamedQueryDefinitions()
-
getNamedNativeQueryDefinition
NamedSQLQueryDefinition getNamedNativeQueryDefinition(String name)
Retrieve named SQL query metadata.- 参数:
name- The SQL query name.- 返回:
- The named query metadata, or
null
-
getNamedNativeQueryDefinitions
Collection<NamedSQLQueryDefinition> getNamedNativeQueryDefinitions()
-
getNamedProcedureCallDefinitions
Collection<NamedProcedureCallDefinition> getNamedProcedureCallDefinitions()
-
getResultSetMapping
ResultSetMappingDefinition getResultSetMapping(String name)
Retrieve the metadata for a named SQL result set mapping.- 参数:
name- The mapping name.- 返回:
- The named result set mapping metadata, or
nullif none found.
-
getResultSetMappingDefinitions
Map<String,ResultSetMappingDefinition> getResultSetMappingDefinitions()
-
getTypeDefinition
TypeDefinition getTypeDefinition(String typeName)
Retrieve a type definition by name.- 参数:
typeName- The name of the type definition to retrieve.- 返回:
- The named type definition, or
null
-
getFilterDefinitions
Map<String,FilterDefinition> getFilterDefinitions()
Retrieves the complete map of filter definitions. Returned map is immutable- 返回:
- The filter definition map.
-
getFilterDefinition
FilterDefinition getFilterDefinition(String name)
Retrieves a filter definition by name.- 参数:
name- The name of the filter definition to retrieve .- 返回:
- The filter definition, or
null.
-
getFetchProfile
FetchProfile getFetchProfile(String name)
-
getFetchProfiles
Collection<FetchProfile> getFetchProfiles()
-
getNamedEntityGraph
NamedEntityGraphDefinition getNamedEntityGraph(String name)
-
getNamedEntityGraphs
Map<String,NamedEntityGraphDefinition> getNamedEntityGraphs()
-
getIdentifierGenerator
IdentifierGeneratorDefinition getIdentifierGenerator(String name)
-
collectTableMappings
Collection<Table> collectTableMappings()
-
getSqlFunctionMap
Map<String,SQLFunction> getSqlFunctionMap()
-
-