@Factory public class EntityManagerFactoryBean extends Object
EntityManagerFactory.| Constructor and Description | 
|---|
EntityManagerFactoryBean(JpaConfiguration jpaConfiguration,
                        io.micronaut.context.env.Environment environment,
                        io.micronaut.context.BeanLocator beanLocator)  | 
| 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.Session | 
currentSession(String dataSource,
              org.hibernate.SessionFactory sessionFactory)
Obtains the current session for teh given session factory. 
 | 
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,
                              ValidatorFactory validatorFactory)
Builds the  
SessionFactoryBuilder to use. | 
protected org.hibernate.boot.registry.StandardServiceRegistry | 
hibernateStandardServiceRegistry(String dataSourceName,
                                DataSource dataSource)
Builds the  
StandardServiceRegistry bean for the given DataSource. | 
void | 
setHibernateInterceptor(org.hibernate.Interceptor hibernateInterceptor)
Sets the  
Interceptor to use. | 
public EntityManagerFactoryBean(JpaConfiguration jpaConfiguration, io.micronaut.context.env.Environment environment, io.micronaut.context.BeanLocator beanLocator)
jpaConfiguration - The JPA configurationenvironment - The environmentbeanLocator - The bean locator@Inject public void setHibernateInterceptor(@Nullable org.hibernate.Interceptor hibernateInterceptor)
Interceptor to use.hibernateInterceptor - The hibernate interceptor@EachBean(value=javax.sql.DataSource.class) protected org.hibernate.boot.registry.StandardServiceRegistry hibernateStandardServiceRegistry(@Parameter String dataSourceName, DataSource dataSource)
StandardServiceRegistry bean for the given DataSource.dataSourceName - The data source namedataSource - The data sourceStandardServiceRegistry@EachBean(value=org.hibernate.boot.registry.StandardServiceRegistry.class) @RequiresHibernateEntities protected org.hibernate.boot.MetadataSources hibernateMetadataSources(@Parameter 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
                                                                                                                                                                                                       ValidatorFactory validatorFactory)
SessionFactoryBuilder to use.metadataSources - The MetadataSourcesvalidatorFactory - The ValidatorFactorySessionFactoryBuilder@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 SessionFactoryBuilderSessionFactory@EachBean(value=org.hibernate.SessionFactory.class) @CurrentSession protected org.hibernate.Session currentSession(@Parameter String dataSource, org.hibernate.SessionFactory sessionFactory)
sessionFactory - The session factorydataSource - The name of the data source.protected org.hibernate.boot.MetadataSources createMetadataSources(@Nonnull org.hibernate.boot.registry.StandardServiceRegistry serviceRegistry)
MetadataSources for the given registry.serviceRegistry - The registry