Class TypeConfiguration

  • All Implemented Interfaces:
    Serializable, SessionFactoryObserver

    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.

    See Also:
    TypeContributor, TypeContributions, Serialized Form