public class DataSource extends Object
| Constructor and Description |
|---|
DataSource(Properties properties)
Contruct a DataSource from a list of properties.
|
DataSource(String datasourceInformation)
Contruct a DataSource from a single String.
|
DataSource(String jndiLocation,
String dataSourceType,
String driverClass,
String url,
String username,
String password)
Contruct a DataSource object.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getDataSourceType()
The type of the data source (typically
javax.sql.XADataSource or
javax.sql.DataSource). |
String |
getDriverClass()
The class name of the JDBC driver.
|
String |
getJndiLocation()
The JNDI location that this datasource should be bound do (in the config file).
|
String |
getPassword()
The password to use when connecting to the database.
|
String |
getStringRepresentation()
Get a string representation of this datasource.
|
String |
getUrl()
The url to connect to the database.
|
String |
getUsername()
The username to use when connecting to the database.
|
String |
toString() |
public DataSource(String jndiLocation, String dataSourceType, String driverClass, String url, String username, String password)
jndiLocation - (typically java:comp/env)dataSourceType - (typically javax.sql.XADataSource or
javax.sql.DataSource)driverClass - The class name of the JDBC driver.
Example: org.hsqldb.jdbcDriverurl - The url to connect to the database.
Example: jdbc:hsqldb:database/jiradbusername - The username to use when connecting to the database.password - The password to use when connecting to the database.public DataSource(String datasourceInformation)
datasourceInformation - A string, really a list of properties, representing a datasourcePropertyUtils.getDataSourceProperties(String)public DataSource(Properties properties)
properties - A list of properties representing this datasourcePropertyUtils.getDataSourceProperties(String)public String getStringRepresentation()
PropertyUtils.getDataSourceString(java.util.Properties)public String getJndiLocation()
java:comp/env) to
this context.public String getDataSourceType()
javax.sql.XADataSource or
javax.sql.DataSource).public String getDriverClass()
org.hsqldb.jdbcDriver.public String getUrl()
jdbc:hsqldb:database/jiradb.public String getUsername()
public String getPassword()
public String toString()
toString in class ObjectObject.toString()Copyright © 2004-2013 Codehaus. All Rights Reserved.