Clover icon

sunshower-base

  1. Project Clover database Fri Apr 6 2018 03:41:27 UTC
  2. Package io.sunshower.persist.hibernate

File HibernateConfiguration.java

 

Coverage histogram

../../../../img/srcFileCovDistChart10.png
0% of files have more coverage

Code metrics

0
14
14
1
132
116
14
1
1
14
1

Classes

Class Line # Actions
HibernateConfiguration 26 14 14
1.0100%
 

Contributing tests

No tests hitting this source file were found.

Source view

1    package io.sunshower.persist.hibernate;
2   
3    import io.sunshower.ignite.IgniteNodeConfiguration;
4    import io.sunshower.persist.validation.ModelValidator;
5    import io.sunshower.persistence.PersistenceUnit;
6    import java.util.Properties;
7    import javax.persistence.EntityManagerFactory;
8    import javax.sql.DataSource;
9    import javax.transaction.TransactionManager;
10    import javax.transaction.TransactionSynchronizationRegistry;
11    import javax.transaction.UserTransaction;
12    import org.apache.ignite.Ignite;
13    import org.cfg4j.provider.ConfigurationProvider;
14    import org.hibernate.search.jpa.FullTextEntityManager;
15    import org.springframework.context.annotation.Bean;
16    import org.springframework.context.annotation.Configuration;
17    import org.springframework.context.annotation.Import;
18    import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
19    import org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor;
20    import org.springframework.transaction.PlatformTransactionManager;
21    import org.springframework.transaction.annotation.EnableTransactionManagement;
22   
23    @Configuration
24    @EnableTransactionManagement
25    @Import(IgniteNodeConfiguration.class)
 
26    public class HibernateConfiguration extends HibernateConfigurer {
27   
 
28  4 toggle @Bean
29    @Override
30    public HibernateProviderConfigurationSource hibernateProviderConfigurationSource(
31    DataDefinitionLanguage ddl,
32    SearchConfiguration searchConfiguration,
33    HibernateDialectProperties props,
34    HibernateCacheConfiguration cacheConfiguration) {
35  4 return super.hibernateProviderConfigurationSource(
36    ddl, searchConfiguration, props, cacheConfiguration);
37    }
38   
 
39  4 toggle @Bean
40    @Override
41    public DataDefinitionLanguage dataDefinitionLanguage(ConfigurationProvider source) {
42  4 return super.dataDefinitionLanguage(source);
43    }
44   
 
45  4 toggle @Bean
46    @Override
47    public HibernateCacheConfiguration hibernateCacheConfiguration(ConfigurationProvider source) {
48  4 return super.hibernateCacheConfiguration(source);
49    }
50   
 
51  4 toggle @Bean
52    @Override
53    public SearchConfiguration searchConfiguration(ConfigurationProvider source) {
54  4 return super.searchConfiguration(source);
55    }
56   
 
57  4 toggle @Bean
58    @Override
59    public HibernateDialectProperties hibernateDialectProperties(ConfigurationProvider source) {
60  4 return super.hibernateDialectProperties(source);
61    }
62   
 
63  4 toggle @Bean
64    @Override
65    public UserTransaction userTransaction() {
66  4 return super.userTransaction();
67    }
68   
 
69  4 toggle @Bean
70    @Override
71    public TransactionManager jtaTransactionManager() {
72  4 return super.jtaTransactionManager();
73    }
74   
 
75  4 toggle @Bean
76    @Override
77    public TransactionSynchronizationRegistry transactionSynchronizationRegistry() {
78  4 return super.transactionSynchronizationRegistry();
79    }
80   
 
81  4 toggle @Bean
82    @Override
83    public PlatformTransactionManager transactionManager(
84    EntityManagerFactory entityManagerFactory,
85    DataSource dataSource,
86    UserTransaction userTransaction,
87    TransactionManager txManager,
88    TransactionSynchronizationRegistry registry) {
89  4 return super.transactionManager(
90    entityManagerFactory, dataSource, userTransaction, txManager, registry);
91    }
92   
 
93  3 toggle @Bean
94    @Override
95    public PersistenceAnnotationBeanPostProcessor persistenceAnnotationBeanPostProcessor() {
96  3 return super.persistenceAnnotationBeanPostProcessor();
97    }
98   
 
99  4 toggle @Bean
100    @Override
101    public ModelValidator modelValidator() {
102  4 return super.modelValidator();
103    }
104   
 
105  4 toggle @Bean
106    @Override
107    public LocalContainerEntityManagerFactoryBean entityManagerFactory(
108    DataSource dataSource,
109    HibernateProviderConfigurationSource source,
110    PersistenceUnit persistenceConfiguration,
111    ConfigurationProvider provider,
112    Ignite ignite) {
113  4 return super.entityManagerFactory(
114    dataSource, source, persistenceConfiguration, provider, ignite);
115    }
116   
 
117  4 toggle @Override
118    protected void configureCache(
119    Ignite ignite,
120    Properties jpaProperties,
121    ConfigurationProvider cfgProvider,
122    HibernateCacheConfiguration cache,
123    HibernateProviderConfigurationSource source) {
124  4 super.configureCache(ignite, jpaProperties, cfgProvider, cache, source);
125    }
126   
 
127  4 toggle @Bean
128    @Override
129    public FullTextEntityManager entityManager(EntityManagerFactory entityManagerFactory) {
130  4 return super.entityManager(entityManagerFactory);
131    }
132    }