@Factory
public class EntityManagerFactoryBean
extends java.lang.Object
EntityManagerFactory.| Constructor and Description |
|---|
EntityManagerFactoryBean(JpaConfiguration jpaConfiguration,
org.hibernate.integrator.spi.Integrator integrator,
io.micronaut.context.ApplicationContext applicationContext) |
| Modifier and Type | Method and Description |
|---|---|
protected org.hibernate.boot.MetadataSources |
createMetadataSources(org.hibernate.boot.registry.StandardServiceRegistry serviceRegistry)
Creates the
MetadataSources for the given registry. |
protected org.hibernate.boot.MetadataSources |
hibernateMetadataSources(JpaConfiguration jpaConfiguration,
org.hibernate.boot.registry.StandardServiceRegistry standardServiceRegistry)
Builds the
MetadataSources for the given StandardServiceRegistry. |
protected org.hibernate.SessionFactory |
hibernateSessionFactory(org.hibernate.boot.SessionFactoryBuilder sessionFactoryBuilder)
Builds the actual
SessionFactory from the builder. |
protected org.hibernate.boot.SessionFactoryBuilder |
hibernateSessionFactoryBuilder(org.hibernate.boot.MetadataSources metadataSources,
javax.validation.ValidatorFactory validatorFactory,
org.hibernate.Interceptor hibernateInterceptor)
Builds the
SessionFactoryBuilder to use. |
protected org.hibernate.boot.registry.StandardServiceRegistry |
hibernateStandardServiceRegistry(java.lang.String dataSourceName,
javax.sql.DataSource dataSource)
Builds the
StandardServiceRegistry bean for the given DataSource. |
public EntityManagerFactoryBean(@Primary @Nullable
JpaConfiguration jpaConfiguration,
@Primary @Nullable
org.hibernate.integrator.spi.Integrator integrator,
io.micronaut.context.ApplicationContext applicationContext)
jpaConfiguration - The JPA configurationintegrator - The integrationapplicationContext - The application context@EachBean(value=javax.sql.DataSource.class)
protected org.hibernate.boot.registry.StandardServiceRegistry hibernateStandardServiceRegistry(@Parameter
java.lang.String dataSourceName,
javax.sql.DataSource dataSource)
StandardServiceRegistry bean for the given DataSource.dataSourceName - The data source namedataSource - The data sourceStandardServiceRegistry@Requires(classes=org.hibernate.mapping.MetadataSource.class)
@EachBean(value=org.hibernate.boot.registry.StandardServiceRegistry.class)
protected org.hibernate.boot.MetadataSources hibernateMetadataSources(@Parameter @Nullable
JpaConfiguration jpaConfiguration,
org.hibernate.boot.registry.StandardServiceRegistry standardServiceRegistry)
MetadataSources for the given StandardServiceRegistry.jpaConfiguration - The JPA configurationstandardServiceRegistry - The standard service registryMetadataSources@EachBean(value=org.hibernate.boot.MetadataSources.class)
@Requires(beans=org.hibernate.boot.MetadataSources.class)
protected org.hibernate.boot.SessionFactoryBuilder hibernateSessionFactoryBuilder(org.hibernate.boot.MetadataSources metadataSources,
@Nullable
javax.validation.ValidatorFactory validatorFactory,
@Nullable
org.hibernate.Interceptor hibernateInterceptor)
SessionFactoryBuilder to use.metadataSources - The MetadataSourcesvalidatorFactory - The ValidatorFactoryhibernateInterceptor - The InterceptorSessionFactoryBuilder@Context @Requires(beans=org.hibernate.boot.SessionFactoryBuilder.class) @Bean(preDestroy="close") @EachBean(value=org.hibernate.boot.SessionFactoryBuilder.class) protected org.hibernate.SessionFactory hibernateSessionFactory(org.hibernate.boot.SessionFactoryBuilder sessionFactoryBuilder)
SessionFactory from the builder.sessionFactoryBuilder - The SessionFactoryBuilderSessionFactoryprotected org.hibernate.boot.MetadataSources createMetadataSources(@NonNull
org.hibernate.boot.registry.StandardServiceRegistry serviceRegistry)
MetadataSources for the given registry.serviceRegistry - The registry