Class TypeConfiguration

java.lang.Object
org.hibernate.type.spi.TypeConfiguration
All Implemented Interfaces:
Serializable, SessionFactoryObserver

@Incubating public class TypeConfiguration extends Object implements SessionFactoryObserver, Serializable
Each instance defines a set of types available in a given persistence unit, and isolates them from other configurations.

Note that each instance of Type is inherently "scoped" to a TypeConfiguration. We always obtain a reference to a Type via the TypeConfiguration associated with the current persistence unit.

On the other hand, a Type does not inherently have access to its parent TypeConfiguration since extensions may contribute instances of Type, via TypeContributions, for example, and the instantiation of such instances occurs outside the control of Hibernate.

In particular, a custom TypeContributor may contribute types to a TypeConfiguration.

If a Type requires access to the parent TypeConfiguration, it should implement TypeConfigurationAware.

Since:
5.3
See Also: