类 MetadataImpl
- java.lang.Object
-
- org.hibernate.boot.internal.MetadataImpl
-
- 所有已实现的接口:
Serializable,Metadata,MetadataImplementor,Mapping
public class MetadataImpl extends Object implements MetadataImplementor, Serializable
Container for configuration data collected during binding the metamodel.- 作者:
- Steve Ebersole, Hardy Ferentschik, Gail Badner
- 另请参阅:
- 序列化表格
-
-
构造器概要
构造器 构造器 说明 MetadataImpl(UUID uuid, MetadataBuildingOptions metadataBuildingOptions, MutableIdentifierGeneratorFactory identifierGeneratorFactory, Map<String,PersistentClass> entityBindingMap, Map<Class,MappedSuperclass> mappedSuperclassMap, Map<String,Collection> collectionBindingMap, Map<String,TypeDefinition> typeDefinitionMap, Map<String,FilterDefinition> filterDefinitionMap, Map<String,FetchProfile> fetchProfileMap, Map<String,String> imports, Map<String,IdentifierGeneratorDefinition> idGeneratorDefinitionMap, Map<String,NamedQueryDefinition> namedQueryMap, Map<String,NamedSQLQueryDefinition> namedNativeQueryMap, Map<String,NamedProcedureCallDefinition> namedProcedureCallMap, Map<String,ResultSetMappingDefinition> sqlResultSetMappingMap, Map<String,NamedEntityGraphDefinition> namedEntityGraphMap, Map<String,SQLFunction> sqlFunctionMap, Database database, BootstrapContext bootstrapContext)
-
方法概要
-
-
-
构造器详细资料
-
MetadataImpl
public MetadataImpl(UUID uuid, MetadataBuildingOptions metadataBuildingOptions, MutableIdentifierGeneratorFactory identifierGeneratorFactory, Map<String,PersistentClass> entityBindingMap, Map<Class,MappedSuperclass> mappedSuperclassMap, Map<String,Collection> collectionBindingMap, Map<String,TypeDefinition> typeDefinitionMap, Map<String,FilterDefinition> filterDefinitionMap, Map<String,FetchProfile> fetchProfileMap, Map<String,String> imports, Map<String,IdentifierGeneratorDefinition> idGeneratorDefinitionMap, Map<String,NamedQueryDefinition> namedQueryMap, Map<String,NamedSQLQueryDefinition> namedNativeQueryMap, Map<String,NamedProcedureCallDefinition> namedProcedureCallMap, Map<String,ResultSetMappingDefinition> sqlResultSetMappingMap, Map<String,NamedEntityGraphDefinition> namedEntityGraphMap, Map<String,SQLFunction> sqlFunctionMap, Database database, BootstrapContext bootstrapContext)
-
-
方法详细资料
-
getMetadataBuildingOptions
public MetadataBuildingOptions getMetadataBuildingOptions()
从接口复制的说明:MetadataImplementorAccess to the options used to build this Metadata- 指定者:
getMetadataBuildingOptions在接口中MetadataImplementor- 返回:
- Access to the MetadataBuildingOptions
-
getTypeConfiguration
public TypeConfiguration getTypeConfiguration()
从接口复制的说明:MetadataImplementorAccess to the TypeConfiguration- 指定者:
getTypeConfiguration在接口中MetadataImplementor- 返回:
- Access to the TypeConfiguration
-
getTypeResolver
@Deprecated public TypeResolver getTypeResolver()
已过时。(since 5.3) No replacement, access to and handling of Types will be much different in 6.0Retrieve theTyperesolver associated with this factory.- 指定者:
getTypeResolver在接口中MetadataImplementor- 返回:
- The type resolver
-
getSessionFactoryBuilder
public SessionFactoryBuilder getSessionFactoryBuilder()
从接口复制的说明:MetadataGet the builder forSessionFactoryinstances based on this metamodel.- 指定者:
getSessionFactoryBuilder在接口中Metadata- 返回:
- The builder for
SessionFactoryinstances.
-
buildSessionFactory
public SessionFactory buildSessionFactory()
从接口复制的说明:MetadataShort-hand form of building aSessionFactorythrough the builder without any additional option overrides.- 指定者:
buildSessionFactory在接口中Metadata- 返回:
- THe built SessionFactory.
-
getDatabase
public Database getDatabase()
从接口复制的说明:MetadataRetrieve the database model.- 指定者:
getDatabase在接口中Metadata- 返回:
- The database model.
-
getIdentifierGeneratorFactory
public MutableIdentifierGeneratorFactory getIdentifierGeneratorFactory()
从接口复制的说明:MappingAllow access to the id generator factory, though this is only needed/allowed from configuration.- 指定者:
getIdentifierGeneratorFactory在接口中Mapping- 返回:
- Access to the identifier generator factory
-
getEntityBindings
public Collection<PersistentClass> getEntityBindings()
从接口复制的说明:MetadataRetrieves the PersistentClass entity metadata representation for all known entities. Returned collection is immutable- 指定者:
getEntityBindings在接口中Metadata- 返回:
- All PersistentClass representations.
-
getEntityBinding
public PersistentClass getEntityBinding(String entityName)
从接口复制的说明:MetadataRetrieves the PersistentClass entity mapping metadata representation for the given entity name.- 指定者:
getEntityBinding在接口中Metadata- 参数:
entityName- The entity name for which to retrieve the metadata.- 返回:
- The entity mapping metadata, or
nullif no matching entity found.
-
getCollectionBindings
public Collection<Collection> getCollectionBindings()
从接口复制的说明:MetadataRetrieves the Collection metadata representation for all known collections. Returned collection is immutable- 指定者:
getCollectionBindings在接口中Metadata- 返回:
- All Collection representations.
-
getCollectionBinding
public Collection getCollectionBinding(String role)
从接口复制的说明:MetadataRetrieves the collection mapping metadata for the given collection role.- 指定者:
getCollectionBinding在接口中Metadata- 参数:
role- The collection role for which to retrieve the metadata.- 返回:
- The collection mapping metadata, or
nullif no matching collection found.
-
getImports
public Map<String,String> getImports()
从接口复制的说明:MetadataRetrieves all defined imports (class renames).- 指定者:
getImports在接口中Metadata- 返回:
- All imports
-
getNamedQueryDefinition
public NamedQueryDefinition getNamedQueryDefinition(String name)
从接口复制的说明:MetadataRetrieve named query metadata by name.- 指定者:
getNamedQueryDefinition在接口中Metadata- 参数:
name- The query name- 返回:
- The named query metadata, or
null.
-
getNamedQueryDefinitions
public Collection<NamedQueryDefinition> getNamedQueryDefinitions()
- 指定者:
getNamedQueryDefinitions在接口中Metadata
-
getNamedNativeQueryDefinition
public NamedSQLQueryDefinition getNamedNativeQueryDefinition(String name)
从接口复制的说明:MetadataRetrieve named SQL query metadata.- 指定者:
getNamedNativeQueryDefinition在接口中Metadata- 参数:
name- The SQL query name.- 返回:
- The named query metadata, or
null
-
getNamedNativeQueryDefinitions
public Collection<NamedSQLQueryDefinition> getNamedNativeQueryDefinitions()
- 指定者:
getNamedNativeQueryDefinitions在接口中Metadata
-
getNamedProcedureCallDefinitions
public Collection<NamedProcedureCallDefinition> getNamedProcedureCallDefinitions()
- 指定者:
getNamedProcedureCallDefinitions在接口中Metadata
-
getResultSetMapping
public ResultSetMappingDefinition getResultSetMapping(String name)
从接口复制的说明:MetadataRetrieve the metadata for a named SQL result set mapping.- 指定者:
getResultSetMapping在接口中Metadata- 参数:
name- The mapping name.- 返回:
- The named result set mapping metadata, or
nullif none found.
-
getResultSetMappingDefinitions
public Map<String,ResultSetMappingDefinition> getResultSetMappingDefinitions()
- 指定者:
getResultSetMappingDefinitions在接口中Metadata
-
getTypeDefinition
public TypeDefinition getTypeDefinition(String typeName)
从接口复制的说明:MetadataRetrieve a type definition by name.- 指定者:
getTypeDefinition在接口中Metadata- 参数:
typeName- The name of the type definition to retrieve.- 返回:
- The named type definition, or
null
-
getFilterDefinitions
public Map<String,FilterDefinition> getFilterDefinitions()
从接口复制的说明:MetadataRetrieves the complete map of filter definitions. Returned map is immutable- 指定者:
getFilterDefinitions在接口中Metadata- 返回:
- The filter definition map.
-
getFilterDefinition
public FilterDefinition getFilterDefinition(String name)
从接口复制的说明:MetadataRetrieves a filter definition by name.- 指定者:
getFilterDefinition在接口中Metadata- 参数:
name- The name of the filter definition to retrieve .- 返回:
- The filter definition, or
null.
-
getFetchProfile
public FetchProfile getFetchProfile(String name)
- 指定者:
getFetchProfile在接口中Metadata
-
getFetchProfiles
public Collection<FetchProfile> getFetchProfiles()
- 指定者:
getFetchProfiles在接口中Metadata
-
getNamedEntityGraph
public NamedEntityGraphDefinition getNamedEntityGraph(String name)
- 指定者:
getNamedEntityGraph在接口中Metadata
-
getNamedEntityGraphs
public Map<String,NamedEntityGraphDefinition> getNamedEntityGraphs()
- 指定者:
getNamedEntityGraphs在接口中Metadata
-
getIdentifierGenerator
public IdentifierGeneratorDefinition getIdentifierGenerator(String name)
- 指定者:
getIdentifierGenerator在接口中Metadata
-
getSqlFunctionMap
public Map<String,SQLFunction> getSqlFunctionMap()
- 指定者:
getSqlFunctionMap在接口中Metadata
-
collectTableMappings
public Collection<Table> collectTableMappings()
- 指定者:
collectTableMappings在接口中Metadata
-
buildNamedQueryRepository
public NamedQueryRepository buildNamedQueryRepository(SessionFactoryImpl sessionFactory)
- 指定者:
buildNamedQueryRepository在接口中MetadataImplementor
-
validate
public void validate() throws MappingException- 指定者:
validate在接口中MetadataImplementor- 抛出:
MappingException
-
getMappedSuperclassMappingsCopy
public Set<MappedSuperclass> getMappedSuperclassMappingsCopy()
-
initSessionFactory
public void initSessionFactory(SessionFactoryImplementor sessionFactory)
- 指定者:
initSessionFactory在接口中MetadataImplementor
-
getIdentifierType
public Type getIdentifierType(String entityName) throws MappingException
- 指定者:
getIdentifierType在接口中Mapping- 抛出:
MappingException
-
getIdentifierPropertyName
public String getIdentifierPropertyName(String entityName) throws MappingException
- 指定者:
getIdentifierPropertyName在接口中Mapping- 抛出:
MappingException
-
getReferencedPropertyType
public Type getReferencedPropertyType(String entityName, String propertyName) throws MappingException
- 指定者:
getReferencedPropertyType在接口中Mapping- 抛出:
MappingException
-
getEntityBindingMap
public Map<String,PersistentClass> getEntityBindingMap()
-
getCollectionBindingMap
public Map<String,Collection> getCollectionBindingMap()
-
getTypeDefinitionMap
public Map<String,TypeDefinition> getTypeDefinitionMap()
-
getFetchProfileMap
public Map<String,FetchProfile> getFetchProfileMap()
-
getMappedSuperclassMap
public Map<Class,MappedSuperclass> getMappedSuperclassMap()
-
getIdGeneratorDefinitionMap
public Map<String,IdentifierGeneratorDefinition> getIdGeneratorDefinitionMap()
-
getNamedQueryMap
public Map<String,NamedQueryDefinition> getNamedQueryMap()
-
getNamedNativeQueryMap
public Map<String,NamedSQLQueryDefinition> getNamedNativeQueryMap()
-
getNamedProcedureCallMap
public Map<String,NamedProcedureCallDefinition> getNamedProcedureCallMap()
-
getSqlResultSetMappingMap
public Map<String,ResultSetMappingDefinition> getSqlResultSetMappingMap()
-
getNamedEntityGraphMap
public Map<String,NamedEntityGraphDefinition> getNamedEntityGraphMap()
-
getBootstrapContext
public BootstrapContext getBootstrapContext()
-
-