Class MultipleDatabaseConfiguration

java.lang.Object
bld.generator.report.excel.config.MultipleDatabaseConfiguration

public abstract class MultipleDatabaseConfiguration extends Object
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.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Instantiates a new multiple database configuration.
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract DataSource
    Data source.
    abstract jakarta.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 jakarta.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
    Gets the entity package.
    protected abstract String
    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
    Jpa vendor adapter.
    abstract org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MultipleDatabaseConfiguration

      public MultipleDatabaseConfiguration()
      Instantiates a new multiple database configuration.
  • Method Details

    • dataSource

      public abstract DataSource dataSource()
      Data source.
      Returns:
      the data source
    • getEntityPackage

      protected abstract String getEntityPackage()
      Gets the entity package.
      Returns:
      the entity package
    • getPersistenceUnit

      protected abstract String 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 builder
      dataSource - the data source
      jpaVendorAdapter - 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 builder
      lcemf - the lcemf
      dataSource - 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 builder
      dataSource - the data source
      jpaVendorAdapter - 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 builder
      lcemf - the lcemf
      dataSource - 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