Class SQLConfig

java.lang.Object
com.almis.awe.autoconfigure.SQLConfig

@Configuration @ConditionalOnProperty(name="awe.database.enabled", havingValue="true", matchIfMissing=true) public class SQLConfig extends Object
Class used to launch initial load treads
  • Constructor Details

    • SQLConfig

      public SQLConfig()
  • Method Details

    • aweDatabaseContextHolder

      @Bean @ConditionalOnMissingBean @ConfigurationProperties("spring.datasource.hikari") public AweDatabaseContextHolder aweDatabaseContextHolder(AweElements elements, QueryService queryService, SessionService sessionService, org.springframework.boot.autoconfigure.jdbc.DataSourceProperties dataSourceProperties, DatabaseConfigProperties databaseConfigProperties)
      Database context holder
      Parameters:
      elements - Awe elements
      queryService - Query service
      sessionService - Session service
      dataSourceProperties - DataSource properties
      databaseConfigProperties - Database config properties
      Returns:
      Database context holder bean
    • aweRoutingDataSource

      @Bean @ConditionalOnProperty(name="awe.database.multidatabase-enable", havingValue="true") @ConditionalOnMissingBean public AweRoutingDataSource aweRoutingDataSource(AweDatabaseContextHolder databaseContextHolder)
      Abstract Routing Datasource.
      Parameters:
      databaseContextHolder - Database context holder
      Returns:
      Datasource bean
    • oracleDatabaseConfiguration

      @Bean @Scope("prototype") public com.querydsl.sql.Configuration oracleDatabaseConfiguration()
      Oracle database configuration
      Returns:
      Oracle database configuration bean
    • sqlserverDatabaseConfiguration

      @Bean @Scope("prototype") public com.querydsl.sql.Configuration sqlserverDatabaseConfiguration()
      SQL Server database configuration
      Returns:
      SQL Server database configuration bean
    • sybaseDatabaseConfiguration

      @Bean @Scope("prototype") public com.querydsl.sql.Configuration sybaseDatabaseConfiguration()
      Sybase database configuration
      Returns:
      Sybase database configuration bean
    • hsqldbDatabaseConfiguration

      @Bean @Scope("prototype") public com.querydsl.sql.Configuration hsqldbDatabaseConfiguration()
      HSQL database configuration
      Returns:
      HSQL database configuration bean
    • h2DatabaseConfiguration

      @Bean @Scope("prototype") public com.querydsl.sql.Configuration h2DatabaseConfiguration()
      H2 database configuration
      Returns:
      HSQL database configuration bean
    • mysqlDatabaseConfiguration

      @Bean @Scope("prototype") public com.querydsl.sql.Configuration mysqlDatabaseConfiguration()
      MySQL database configuration
      Returns:
      MySQL database configuration bean
    • sqlQueryConnector

      @Bean @ConditionalOnMissingBean @Autowired public SQLQueryConnector sqlQueryConnector(AweDatabaseContextHolder contextHolder, QueryUtil queryUtil, DataSource dataSource, BaseConfigProperties baseConfigProperties, AweElements elements, NumericService numericService, EncodeService encodeService, DatabaseConfigProperties databaseConfigProperties)
      SQL Query connector
      Parameters:
      contextHolder - Context holder
      queryUtil - Query util
      dataSource - Datasource
      baseConfigProperties - Base configuration properties
      elements - AWE elements
      numericService - Numeric Service
      encodeService - Encode Service
      databaseConfigProperties - Database configuration properties
      Returns:
      SQL Query connector bean
    • sqlMaintainConnector

      @Bean @ConditionalOnMissingBean public SQLMaintainConnector sqlMaintainConnector(QueryUtil queryUtil, DatabaseConfigProperties databaseConfigProperties)
      SQL Maintain connector
      Parameters:
      queryUtil - QueryUtil service
      databaseConfigProperties - Database configuration properties
      Returns:
      SQL Query connector bean
    • sqlQueryBuilder

      @Bean @ConditionalOnMissingBean @Scope("prototype") public SQLQueryBuilder sqlQueryBuilder(QueryUtil queryUtil, EncodeService encodeService)
      SQL Query builder
      Parameters:
      queryUtil - Query utilities
      encodeService - Encode service
      Returns:
      SQL Query builder bean
    • sqlMaintainBuilder

      @Bean @ConditionalOnMissingBean @Scope("prototype") public SQLMaintainBuilder sqlMaintainBuilder(QueryUtil queryUtil, EncodeService encodeService, DatabaseConfigProperties databaseConfigProperties)
      SQL Maintain builder
      Parameters:
      queryUtil - QueryUtil service
      encodeService - Encode service
      databaseConfigProperties - Database properties
      Returns:
      SQLMaintainBuilder bean