Top Description Methods
org.hibernate.integrator.spi

public Interface Integrator

Known Direct Implementers
org.hibernate.boot.beanvalidation.BeanValidationIntegrator, org.hibernate.cache.internal.CollectionCacheInvalidator
Annotations
@JavaServiceLoadable
Imports
org.hibernate.Incubating, org.hibernate.boot.Metadata, org.hibernate.boot.spi.BootstrapContext, org.hibernate.engine.spi.SessionFactoryImplementor, org.hibernate.service.JavaServiceLoadable, org.hibernate.service.spi.SessionFactoryServiceRegistry

Contract for extensions that integrate with Hibernate.

The best way to make an implementation of Integrator available to Hibernate is by making it discoverable via the standard Java java.util.ServiceLoader facility.

Implementation Note

integrate(Metadata, BootstrapContext, SessionFactoryImplementor) is called during the process of session factory initialization. In fact, it's called directly from the constructor of org.hibernate.internal.SessionFactoryImpl. So the passed session factory is not yet fully-initialized and is in a very fragile state.

Author
Steve Ebersole
Since
4.0

Method Summary

Modifier and TypeMethod and Description
public void
disintegrate(SessionFactoryImplementor
The session factory being closed.
sessionFactory
,
SessionFactoryServiceRegistry
That session factory's service registry
serviceRegistry
)

Deprecated as a consequence of SessionFactoryImplementor being deprecated.
Tongue-in-cheek name for a shutdown callback.
public default void
integrate(Metadata
The "compiled" representation of the mapping information
metadata
,
SessionFactoryImplementor
The session factory being created
sessionFactory
,
SessionFactoryServiceRegistry
The session factory's service registry
serviceRegistry
)

Deprecated since 6.0. - use
Perform integration.
public default void
integrate(Metadata
The fully initialized boot-time mapping model
metadata
,
BootstrapContext
The context for bootstrapping of the SessionFactory
bootstrapContext
,
SessionFactoryImplementor
The SessionFactory being created
sessionFactory
)

Deprecated as a consequence of Metadata and SessionFactoryImplementor being deprecated.
Perform integration.

Method Detail

disintegrateback to summary
public void disintegrate(SessionFactoryImplementor sessionFactory, SessionFactoryServiceRegistry serviceRegistry)

Deprecated

as a consequence of SessionFactoryImplementor being deprecated. See corresponding docs for further information.

Tongue-in-cheek name for a shutdown callback.

Parameters
sessionFactory:SessionFactoryImplementor

The session factory being closed.

serviceRegistry:SessionFactoryServiceRegistry

That session factory's service registry

integrateback to summary
public default void integrate(Metadata metadata, SessionFactoryImplementor sessionFactory, SessionFactoryServiceRegistry serviceRegistry)

Deprecated

since 6.0.

- use

Perform integration.

Parameters
metadata:Metadata

The "compiled" representation of the mapping information

sessionFactory:SessionFactoryImplementor

The session factory being created

serviceRegistry:SessionFactoryServiceRegistry

The session factory's service registry

Annotations
@Deprecated
since:6.0
integrateback to summary
public default void integrate(Metadata metadata, BootstrapContext bootstrapContext, SessionFactoryImplementor sessionFactory)

Deprecated

as a consequence of Metadata and SessionFactoryImplementor being deprecated. See corresponding docs for further information.

Perform integration.

Parameters
metadata:Metadata

The fully initialized boot-time mapping model

bootstrapContext:BootstrapContext

The context for bootstrapping of the SessionFactory

sessionFactory:SessionFactoryImplementor

The SessionFactory being created

Annotations
@Incubating