Interface Integrator

  • All Known Implementing Classes:
    BeanValidationIntegrator, CollectionCacheInvalidator, EnversIntegrator

    public interface Integrator
    Contract for stuff that integrates with Hibernate.

    IMPL NOTE: called during session factory initialization (constructor), so not all parts of the passed session factory will be available.

    • Method Detail

      • integrate

        default void integrate​(Metadata metadata,
                               SessionFactoryImplementor sessionFactory,
                               SessionFactoryServiceRegistry serviceRegistry)
        - use
        Perform integration.
        metadata - The "compiled" representation of the mapping information
        sessionFactory - The session factory being created
        serviceRegistry - The session factory's service registry
      • integrate

        default void integrate​(Metadata metadata,
                               BootstrapContext bootstrapContext,
                               SessionFactoryImplementor sessionFactory)
        Perform integration.
        metadata - The fully initialized boot-time mapping model
        bootstrapContext - The context for bootstrapping of the SessionFactory
        sessionFactory - The SessionFactory being created todo (6.0) : why pass the `serviceRegistry`? Why not just grab it from the SessionFactory?
      • disintegrate

        void disintegrate​(SessionFactoryImplementor sessionFactory,
                          SessionFactoryServiceRegistry serviceRegistry)
        Tongue-in-cheek name for a shutdown callback.
        sessionFactory - The session factory being closed.
        serviceRegistry - That session factory's service registry