public class GenericDbConfigFactory extends Object implements ConfigurableDbConfigFactory
DbConfig
for generic data basesConstructor 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)
DbConfigFactory
DbConfig
to access a given DataSource
create
in interface DbConfigFactory
name
- 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 DbConfig
dataSource
- 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)
ConfigurableDbConfigFactory
DbConfig
setCustomDataTypes
in interface ConfigurableDbConfigFactory
customDataTypes
- list of custom types. Non nullpublic void setRetryPolicyTemplate(RetryPolicyTemplate retryPolicyTemplate)
ConfigurableDbConfigFactory
DbConfig
setRetryPolicyTemplate
in interface ConfigurableDbConfigFactory
retryPolicyTemplate
- retry policety template. Can be null.public void setMuleContext(MuleContext muleContext)
protected RetryPolicyTemplate getDefaultRetryPolicyTemplate()
Copyright © 2003–2018 MuleSoft, Inc.. All rights reserved.