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.
<p/>
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.
<p/>
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 the TypeConfigurationAware
interface.
Constructor and Description |
---|
TypeConfiguration() |
Modifier and Type | Method and Description |
---|---|
BasicTypeRegistry |
getBasicTypeRegistry() |
Map<String,String> |
getImportMap() |
JavaTypeDescriptorRegistry |
getJavaTypeDescriptorRegistry() |
MetadataBuildingContext |
getMetadataBuildingContext()
Obtain the MetadataBuildingContext currently scoping the
TypeConfiguration.
|
SessionFactoryImplementor |
getSessionFactory()
Obtain the SessionFactory currently scoping the TypeConfiguration.
|
SqlTypeDescriptorRegistry |
getSqlTypeDescriptorRegistry() |
TypeResolver |
getTypeResolver()
Deprecated.
(since 5.3) No replacement, access to and handling of Types will be much different in 6.0
|
String |
getUuid() |
void |
scope(MetadataBuildingContext metadataBuildingContext) |
MetamodelImplementor |
scope(SessionFactoryImplementor sessionFactory,
BootstrapContext bootstrapContext) |
void |
sessionFactoryClosed(SessionFactory factory)
Callback to indicate that the given factory has been closed.
|
void |
sessionFactoryCreated(SessionFactory factory)
Callback to indicate that the given factory has been created and is now ready for use.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
sessionFactoryClosing
public String getUuid()
@Deprecated public TypeResolver getTypeResolver()
Temporarily needed to support deprecations
Retrieve the Type
resolver associated with this factory.
public BasicTypeRegistry getBasicTypeRegistry()
public JavaTypeDescriptorRegistry getJavaTypeDescriptorRegistry()
public SqlTypeDescriptorRegistry getSqlTypeDescriptorRegistry()
public MetadataBuildingContext getMetadataBuildingContext()
Obtain the MetadataBuildingContext currently scoping the TypeConfiguration.
public void scope(MetadataBuildingContext metadataBuildingContext)
public MetamodelImplementor scope(SessionFactoryImplementor sessionFactory, BootstrapContext bootstrapContext)
public SessionFactoryImplementor getSessionFactory()
Obtain the SessionFactory currently scoping the TypeConfiguration.
IllegalStateException
- if the TypeConfiguration is currently not
associated with a SessionFactory (in "runtime stage").public void sessionFactoryCreated(SessionFactory factory)
SessionFactoryObserver
Callback to indicate that the given factory has been created and is now ready for use.
sessionFactoryCreated
in interface SessionFactoryObserver
factory
- The factory initialized.public void sessionFactoryClosed(SessionFactory factory)
SessionFactoryObserver
Callback 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
in interface SessionFactoryObserver
factory
- The factory closed.Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.