org.synchronoss.cpo.jdbc
Class DriverJdbcDataSourceInfo
java.lang.Object
org.synchronoss.cpo.AbstractDataSourceInfo
org.synchronoss.cpo.jdbc.AbstractJdbcDataSourceInfo
org.synchronoss.cpo.jdbc.AbstractJdbcDataSource
org.synchronoss.cpo.jdbc.DriverJdbcDataSourceInfo
- All Implemented Interfaces:
- Wrapper, CommonDataSource, DataSource, DataSourceInfo
public class DriverJdbcDataSourceInfo
- extends AbstractJdbcDataSource
Collects the info required to instantiate a DataSource from a JDBC Driver
Provides the DataSourceInfo factory method getDataSource which instantiates the DataSource
- Author:
- dberry
DriverJdbcDataSourceInfo
public DriverJdbcDataSourceInfo(String driver,
String url)
throws CpoException
- Creates a DriverJdbcDataSourceInfo from a Jdbc Driver
- Parameters:
driver - The text name of the driverurl - - The url that points to the database.
- Throws:
CpoException
DriverJdbcDataSourceInfo
public DriverJdbcDataSourceInfo(String driver,
String url,
Properties properties)
throws CpoException
- Creates a DriverJdbcDataSourceInfo from a Jdbc Driver
- Parameters:
driver - The text name of the driverurl - - The url that points to the database.properties - - The connection properties for connecting to the database
- Throws:
CpoException
DriverJdbcDataSourceInfo
public DriverJdbcDataSourceInfo(String driver,
String url,
String username,
String password)
throws CpoException
- Creates a DriverJdbcDataSourceInfo from a Jdbc Driver
- Parameters:
driver - The text name of the driverurl - - The url that points to the database.username - - The username for connecting to the databasepassword - - The password for connectinf to the database
- Throws:
CpoException
createDataSource
protected DataSource createDataSource()
throws CpoException
- Specified by:
createDataSource in class AbstractDataSourceInfo
- Throws:
CpoException
getConnection
public Connection getConnection()
throws SQLException
- Throws:
SQLException
toString
public String toString()
- Overrides:
toString in class Object
Copyright © 2014. All Rights Reserved.