public class GenericDbConfigFactory extends Object implements ConfigurableDbConfigFactory
DbConfig for generic data bases| Constructor and Description |
|---|
GenericDbConfigFactory() |
| Modifier and Type | Method and Description |
|---|---|
DbConfig |
create(String name,
Map<QName,Object> annotations,
DataSource dataSource)
Creates a
DbConfig to access a given DataSource |
protected DbConnectionFactory |
createDbConnectionFactory(DataSource dataSource,
ConnectionFactory connectionFactory,
DbTypeManager dbTypeManager)
Creates the
DbConnectionFactory to use on the created DbConfig |
protected DbConfig |
doCreateDbConfig(DataSource datasource,
DbTypeManager dbTypeManager,
DbConnectionFactory dbConnectionFactory,
String name) |
protected DbTypeManager |
doCreateTypeManager() |
protected RetryPolicyTemplate |
getDefaultRetryPolicyTemplate() |
protected List<DbType> |
getVendorDataTypes() |
void |
setCustomDataTypes(List<DbType> customDataTypes)
Sets the list of custom types available for the created
DbConfig |
void |
setMuleContext(MuleContext muleContext) |
void |
setRetryPolicyTemplate(RetryPolicyTemplate retryPolicyTemplate)
Sets the retry policy template for the created
DbConfig |
public DbConfig create(String name, Map<QName,Object> annotations, DataSource dataSource)
DbConfigFactoryDbConfig to access a given DataSourcecreate in interface DbConfigFactoryname - name of the configdataSource - dataSource to access from the created DbConfigprotected DbConnectionFactory createDbConnectionFactory(DataSource dataSource, ConnectionFactory connectionFactory, DbTypeManager dbTypeManager)
DbConnectionFactory to use on the created DbConfigdataSource - datasource used on the DB config.connectionFactory - creates the connections delegates for the created factory.dbTypeManager - manages types provided on the created connections.protected DbConfig doCreateDbConfig(DataSource datasource, DbTypeManager dbTypeManager, DbConnectionFactory dbConnectionFactory, String name)
protected DbTypeManager doCreateTypeManager()
public void setCustomDataTypes(List<DbType> customDataTypes)
ConfigurableDbConfigFactoryDbConfigsetCustomDataTypes in interface ConfigurableDbConfigFactorycustomDataTypes - list of custom types. Non nullpublic void setRetryPolicyTemplate(RetryPolicyTemplate retryPolicyTemplate)
ConfigurableDbConfigFactoryDbConfigsetRetryPolicyTemplate in interface ConfigurableDbConfigFactoryretryPolicyTemplate - retry policety template. Can be null.public void setMuleContext(MuleContext muleContext)
protected RetryPolicyTemplate getDefaultRetryPolicyTemplate()
Copyright © 2003–2018 MuleSoft, Inc.. All rights reserved.