类 TypeConfiguration
- java.lang.Object
-
- org.hibernate.type.spi.TypeConfiguration
-
- 所有已实现的接口:
Serializable,SessionFactoryObserver
public class TypeConfiguration extends Object implements SessionFactoryObserver, Serializable
Defines a set of available Type instances as isolated from other configurations. The isolation is defined by each instance of a TypeConfiguration. Note that each Type is inherently "scoped" to a TypeConfiguration. We only ever access a Type through a TypeConfiguration - specifically the TypeConfiguration in effect for the current persistence unit. Even though each Type instance is scoped to a TypeConfiguration, Types do not inherently have access to that TypeConfiguration (mainly because Type is an extension contract - meaning that Hibernate does not manage the full set of Types available in ever TypeConfiguration). However Types will often want access to the TypeConfiguration, which can be achieved by the Type simply implementing theTypeConfigurationAwareinterface.- 从以下版本开始:
- 5.3
- 作者:
- Steve Ebersole
- 另请参阅:
- 序列化表格
-
-
构造器概要
构造器 构造器 说明 TypeConfiguration()
-
方法概要
所有方法 实例方法 具体方法 已过时的方法 修饰符和类型 方法 说明 voidaddBasicTypeRegistrationContributions(List<BasicTypeRegistration> contributions)BasicTypeRegistrygetBasicTypeRegistry()Map<String,String>getImportMap()JavaTypeDescriptorRegistrygetJavaTypeDescriptorRegistry()Map<Integer,Set<String>>getJdbcToHibernateTypeContributionMap()MetadataBuildingContextgetMetadataBuildingContext()Obtain the MetadataBuildingContext currently scoping the TypeConfiguration.ServiceRegistrygetServiceRegistry()Obtain the ServiceRegistry scoped to the TypeConfiguration.SessionFactoryImplementorgetSessionFactory()Obtain the SessionFactory currently scoping the TypeConfiguration.SqlTypeDescriptorRegistrygetSqlTypeDescriptorRegistry()TypeResolvergetTypeResolver()已过时。(since 5.3) No replacement, access to and handling of Types will be much different in 6.0StringgetUuid()voidscope(MetadataBuildingContext metadataBuildingContext)MetamodelImplementorscope(SessionFactoryImplementor sessionFactory)voidsessionFactoryClosed(SessionFactory factory)Callback to indicate that the given factory has been closed.voidsessionFactoryCreated(SessionFactory factory)Callback to indicate that the given factory has been created and is now ready for use.-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 org.hibernate.SessionFactoryObserver
sessionFactoryClosing
-
-
-
-
方法详细资料
-
getUuid
public String getUuid()
-
getTypeResolver
@Deprecated public TypeResolver getTypeResolver()
已过时。(since 5.3) No replacement, access to and handling of Types will be much different in 6.0Temporarily needed to support deprecations Retrieve theTyperesolver associated with this factory.- 返回:
- The type resolver
-
getBasicTypeRegistry
public BasicTypeRegistry getBasicTypeRegistry()
-
getJavaTypeDescriptorRegistry
public JavaTypeDescriptorRegistry getJavaTypeDescriptorRegistry()
-
getSqlTypeDescriptorRegistry
public SqlTypeDescriptorRegistry getSqlTypeDescriptorRegistry()
-
getJdbcToHibernateTypeContributionMap
public Map<Integer,Set<String>> getJdbcToHibernateTypeContributionMap()
-
getMetadataBuildingContext
public MetadataBuildingContext getMetadataBuildingContext()
Obtain the MetadataBuildingContext currently scoping the TypeConfiguration.- 返回:
- The MetadataBuildingContext
-
scope
public void scope(MetadataBuildingContext metadataBuildingContext)
-
scope
public MetamodelImplementor scope(SessionFactoryImplementor sessionFactory)
-
getSessionFactory
public SessionFactoryImplementor getSessionFactory()
Obtain the SessionFactory currently scoping the TypeConfiguration.- 返回:
- The SessionFactory
- 抛出:
IllegalStateException- if the TypeConfiguration is currently not associated with a SessionFactory (in "runtime stage").
-
getServiceRegistry
public ServiceRegistry getServiceRegistry()
Obtain the ServiceRegistry scoped to the TypeConfiguration.- 返回:
- The ServiceRegistry
-
sessionFactoryCreated
public void sessionFactoryCreated(SessionFactory factory)
从接口复制的说明:SessionFactoryObserverCallback to indicate that the given factory has been created and is now ready for use.- 指定者:
sessionFactoryCreated在接口中SessionFactoryObserver- 参数:
factory- The factory initialized.
-
sessionFactoryClosed
public void sessionFactoryClosed(SessionFactory factory)
从接口复制的说明:SessionFactoryObserverCallback to indicate that the given factory has been closed. Care should be taken in how (if at all) the passed factory reference is used since it is closed.- 指定者:
sessionFactoryClosed在接口中SessionFactoryObserver- 参数:
factory- The factory closed.
-
addBasicTypeRegistrationContributions
public void addBasicTypeRegistrationContributions(List<BasicTypeRegistration> contributions)
-
-