|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.config.database.JdbcDatasource
public final class JdbcDatasource
A JDBC datasource
Constructor Summary | |
---|---|
JdbcDatasource(DatabaseType databaseType,
String hostname,
String port,
String instance,
String username,
String password,
Integer poolSize,
String validationQuery,
Long minEvictableTimeMillis,
Long timeBetweenEvictionRunsMillis)
|
|
JdbcDatasource(String jdbcUrl,
String driverClassName,
String username,
String password,
int poolSize,
String validationQuery,
Long minEvictableTimeMillis,
Long timeBetweenEvictionRunsMillis)
|
|
JdbcDatasource(String jdbcUrl,
String driverClassName,
String username,
String password,
Properties connectionProperties,
int poolSize,
String validationQuery,
Long minEvictableTimeMillis,
Long timeBetweenEvictionRunsMillis)
|
Method Summary | |
---|---|
Connection |
getConnection(com.atlassian.config.bootstrap.AtlassianBootstrapManager bootstrapManager)
Uses the given link AtlassianBootstrapManager to acquire a Connection to the database defined by
this Datasource . |
Properties |
getConnectionProperties()
|
org.ofbiz.core.entity.config.DatasourceInfo |
getDatasource(String datasourceName,
String databaseType,
String schemaName)
Get the equivalent Ofbiz DatasourceInfo config class for this Datasource. |
String |
getDescriptorLabel()
Provides the name of the datasource field that this datasource represents. |
String |
getDescriptorValue(String databaseType)
Provides a text description suitable for an administrator that identifies the datasource. |
String |
getDriverClassName()
The class name for the driver |
String |
getJdbcUrl()
The JDBC URL |
Long |
getMinEvictableTimeMillis()
|
String |
getPassword()
The password for the database connection |
int |
getPoolSize()
The size of the database connection pool |
Long |
getTimeBetweenEvictionRunsMillis()
|
String |
getUsername()
The username for the database connection |
String |
getValidationQuery()
|
static void |
setRegisterDriverOnConstruct(boolean registerDriverOnConstruct)
This setting is soley so the config tool can avoid the fatal side-effect of registering the JDBC driver in this class's constructor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JdbcDatasource(String jdbcUrl, String driverClassName, String username, String password, int poolSize, String validationQuery, Long minEvictableTimeMillis, Long timeBetweenEvictionRunsMillis)
public JdbcDatasource(String jdbcUrl, String driverClassName, String username, String password, Properties connectionProperties, int poolSize, String validationQuery, Long minEvictableTimeMillis, Long timeBetweenEvictionRunsMillis)
public JdbcDatasource(DatabaseType databaseType, String hostname, String port, String instance, String username, String password, Integer poolSize, String validationQuery, Long minEvictableTimeMillis, Long timeBetweenEvictionRunsMillis)
Method Detail |
---|
public static void setRegisterDriverOnConstruct(boolean registerDriverOnConstruct)
registerDriverOnConstruct
- If true we do "Class.forName(driverClassName);" in the Constructor.public Connection getConnection(com.atlassian.config.bootstrap.AtlassianBootstrapManager bootstrapManager) throws com.atlassian.config.bootstrap.BootstrapException
Datasource
link AtlassianBootstrapManager
to acquire a Connection
to the database defined by
this Datasource
.
getConnection
in interface Datasource
bootstrapManager
- the bootstrapManager to use to get the connection.
com.atlassian.config.bootstrap.BootstrapException
- if the connection cannot be established.public org.ofbiz.core.entity.config.DatasourceInfo getDatasource(String datasourceName, String databaseType, String schemaName)
Datasource
getDatasource
in interface Datasource
datasourceName
- the ofbiz name of the datasource.databaseType
- the field-type for the datasource as defined in ofbiz field-types.xmlschemaName
- the name of the schema for the database (may be empty)
DatasourceInfo
suitable for configuring Ofbiz.public String getDescriptorValue(String databaseType)
Datasource
getDescriptorValue
in interface Datasource
databaseType
- the field-type for the datasource as defined in ofbiz field-types.xml
public String getDescriptorLabel()
Datasource
getDescriptorLabel
in interface Datasource
public String getJdbcUrl()
public String getDriverClassName()
public String getUsername()
public String getPassword()
public Properties getConnectionProperties()
public int getPoolSize()
public String getValidationQuery()
public Long getMinEvictableTimeMillis()
public Long getTimeBetweenEvictionRunsMillis()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |