public abstract class MultipleDatabaseConfiguration extends Object
| Constructor and Description |
|---|
MultipleDatabaseConfiguration()
Instantiates a new multiple database configuration.
|
| Modifier and Type | Method and Description |
|---|---|
abstract DataSource |
dataSource()
Data source.
|
abstract javax.persistence.EntityManager |
entityManager(org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean lcemf)
Entity manager.
|
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.
|
protected javax.persistence.EntityManager |
getEntityManager(org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean lcemf)
Gets the entity manager.
|
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.
|
protected abstract String |
getEntityPackage()
Gets the entity package.
|
protected abstract String |
getPersistenceUnit()
Gets the persistence unit.
|
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.
|
abstract org.springframework.orm.jpa.JpaVendorAdapter |
jpaVendorAdapter()
Jpa vendor adapter.
|
abstract org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate |
namedParameterJdbcTemplate(DataSource dataSource)
Named parameter jdbc template.
|
abstract org.springframework.transaction.PlatformTransactionManager |
transactionManager(org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder builder,
org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean lcemf,
DataSource dataSource)
Transaction manager.
|
public MultipleDatabaseConfiguration()
public abstract DataSource dataSource()
protected abstract String getEntityPackage()
protected abstract String getPersistenceUnit()
public abstract org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean entityManagerFactory(org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder builder,
DataSource dataSource,
org.springframework.orm.jpa.JpaVendorAdapter jpaVendorAdapter)
builder - the builderdataSource - the data sourcejpaVendorAdapter - the jpa vendor adapterpublic abstract org.springframework.orm.jpa.JpaVendorAdapter jpaVendorAdapter()
public abstract org.springframework.transaction.PlatformTransactionManager transactionManager(org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder builder,
org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean lcemf,
DataSource dataSource)
builder - the builderlcemf - the lcemfdataSource - the data sourcepublic abstract org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate namedParameterJdbcTemplate(DataSource dataSource)
dataSource - the data sourcepublic abstract javax.persistence.EntityManager entityManager(org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean lcemf)
lcemf - the lcemfprotected org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean getEntityManagerFactory(org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder builder,
DataSource dataSource,
org.springframework.orm.jpa.JpaVendorAdapter jpaVendorAdapter)
builder - the builderdataSource - the data sourcejpaVendorAdapter - the jpa vendor adapterprotected org.springframework.transaction.PlatformTransactionManager getTransactionManager(org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder builder,
org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean lcemf,
DataSource dataSource)
builder - the builderlcemf - the lcemfdataSource - the data sourceprotected javax.persistence.EntityManager getEntityManager(org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean lcemf)
lcemf - the lcemfCopyright © 2022. All rights reserved.