Class MultipleDatabaseConfiguration
java.lang.Object
bld.generator.report.excel.config.MultipleDatabaseConfiguration
The Class MultipleDatabaseConfiguration.
The classes that will extend @{link bld.generator.report.excel.config.MultipleDatabaseConfiguration} will need to implement abstract functions to configuration the n data sources.
The classes that will extend @{link bld.generator.report.excel.config.MultipleDatabaseConfiguration} will need to implement abstract functions to configuration the n data sources.
-
Constructor Summary
ConstructorsConstructorDescriptionInstantiates a new multiple database configuration. -
Method Summary
Modifier and TypeMethodDescriptionabstract DataSourceData source.abstract jakarta.persistence.EntityManagerentityManager(org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean lcemf) Entity manager.abstract org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBeanentityManagerFactory(org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder builder, DataSource dataSource, org.springframework.orm.jpa.JpaVendorAdapter jpaVendorAdapter) Entity manager factory.protected jakarta.persistence.EntityManagergetEntityManager(org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean lcemf) Gets the entity manager.protected org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBeangetEntityManagerFactory(org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder builder, DataSource dataSource, org.springframework.orm.jpa.JpaVendorAdapter jpaVendorAdapter) Gets the entity manager factory.protected abstract StringGets the entity package.protected abstract StringGets the persistence unit.protected org.springframework.transaction.PlatformTransactionManagergetTransactionManager(org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder builder, org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean lcemf, DataSource dataSource) Gets the transaction manager.abstract org.springframework.orm.jpa.JpaVendorAdapterJpa vendor adapter.abstract org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplatenamedParameterJdbcTemplate(DataSource dataSource) Named parameter jdbc template.abstract org.springframework.transaction.PlatformTransactionManagertransactionManager(org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder builder, org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean lcemf, DataSource dataSource) Transaction manager.
-
Constructor Details
-
MultipleDatabaseConfiguration
public MultipleDatabaseConfiguration()Instantiates a new multiple database configuration.
-
-
Method Details
-
dataSource
Data source.- Returns:
- the data source
-
getEntityPackage
Gets the entity package.- Returns:
- the entity package
-
getPersistenceUnit
Gets the persistence unit.- Returns:
- the persistence unit
-
entityManagerFactory
public abstract org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean entityManagerFactory(org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder builder, DataSource dataSource, org.springframework.orm.jpa.JpaVendorAdapter jpaVendorAdapter) Entity manager factory.- Parameters:
builder- the builderdataSource- the data sourcejpaVendorAdapter- the jpa vendor adapter- Returns:
- the local container entity manager factory bean
-
jpaVendorAdapter
public abstract org.springframework.orm.jpa.JpaVendorAdapter jpaVendorAdapter()Jpa vendor adapter.- Returns:
- the jpa vendor adapter
-
transactionManager
public abstract org.springframework.transaction.PlatformTransactionManager transactionManager(org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder builder, org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean lcemf, DataSource dataSource) Transaction manager.- Parameters:
builder- the builderlcemf- the lcemfdataSource- the data source- Returns:
- the platform transaction manager
-
namedParameterJdbcTemplate
public abstract org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate namedParameterJdbcTemplate(DataSource dataSource) Named parameter jdbc template.- Parameters:
dataSource- the data source- Returns:
- the named parameter jdbc template
-
entityManager
public abstract jakarta.persistence.EntityManager entityManager(org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean lcemf) Entity manager.- Parameters:
lcemf- the lcemf- Returns:
- the entity manager
-
getEntityManagerFactory
protected org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean getEntityManagerFactory(org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder builder, DataSource dataSource, org.springframework.orm.jpa.JpaVendorAdapter jpaVendorAdapter) Gets the entity manager factory.- Parameters:
builder- the builderdataSource- the data sourcejpaVendorAdapter- the jpa vendor adapter- Returns:
- the entity manager factory
-
getTransactionManager
protected org.springframework.transaction.PlatformTransactionManager getTransactionManager(org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder builder, org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean lcemf, DataSource dataSource) Gets the transaction manager.- Parameters:
builder- the builderlcemf- the lcemfdataSource- the data source- Returns:
- the transaction manager
-
getEntityManager
protected jakarta.persistence.EntityManager getEntityManager(org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean lcemf) Gets the entity manager.- Parameters:
lcemf- the lcemf- Returns:
- the entity manager
-