Class Db2DatabaseConfiguration
java.lang.Object
io.nflow.engine.config.db.DatabaseConfiguration
io.nflow.engine.config.db.Db2DatabaseConfiguration
@Profile("nflow.db.db2")
@Configuration
public class Db2DatabaseConfiguration
extends DatabaseConfiguration
Configuration for DB2 database. Note: tested only using DB2 Express-C (Docker: ibmcom/db2express-c).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classSQL variants optimized for DB2. -
Field Summary
Fields inherited from class DatabaseConfiguration
NFLOW_DATABASE_INITIALIZERModifier and TypeFieldDescriptionstatic final StringName of the nFlow database initializer bean. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckDatabaseConfiguration(Environment env, DataSource dataSource) Checks that the database is configured as nFlow expects.io.nflow.engine.internal.storage.db.SQLVariantssqlVariants(Environment env) Creates the SQL variants for the database.Methods inherited from class DatabaseConfiguration
getDbType, nflowDatabaseInitializer, nflowDatasource, nflowDatasource, nflowJdbcTemplate, nflowNamedParameterJdbcTemplate, nflowTransactionTemplate, property, propertyModifier and TypeMethodDescriptionReturn the type of the database.io.nflow.engine.internal.storage.db.DatabaseInitializernflowDatabaseInitializer(DataSource dataSource, Environment env) Creates the nFlow database initializer.nflowDatasource(Environment env, Object metricRegistry) nflowDatasource(Environment env, BeanFactory appCtx) Creates the datasource bean for nFlow.nflowJdbcTemplate(DataSource nflowDataSource) Creates a JDBC template using nFlow datasource.nflowNamedParameterJdbcTemplate(DataSource nflowDataSource) Creates a named parameter JDBC template using nFlow datasource.nflowTransactionTemplate(PlatformTransactionManager platformTransactionManager) Creates a transaction template.protected Stringproperty(Environment env, String key) Get a database configuration string property from the environment, or if the generic property is not defined, the property based on the database type.protected <T> Tproperty(Environment env, String key, Class<T> type) Get the database configuration property of given type from the environment, or if the generic property is not defined, the property based on the database type.
-
Constructor Details
-
Db2DatabaseConfiguration
public Db2DatabaseConfiguration()Create a new instance.
-
-
Method Details
-
sqlVariants
Creates the SQL variants for the database.- Specified by:
sqlVariantsin classDatabaseConfiguration- Parameters:
env- The Spring environment.- Returns:
- SQL variants optimized for the database.
-
checkDatabaseConfiguration
Description copied from class:DatabaseConfigurationChecks that the database is configured as nFlow expects.- Overrides:
checkDatabaseConfigurationin classDatabaseConfiguration- Parameters:
env- The Spring environment.dataSource- The nFlow datasource.
-