org.synchronoss.cpo.jdbc
Class DriverDataSourceInfo
java.lang.Object
org.synchronoss.cpo.jdbc.AbstractDataSourceInfo
org.synchronoss.cpo.jdbc.AbstractDataSource
org.synchronoss.cpo.jdbc.DriverDataSourceInfo
- All Implemented Interfaces:
- java.sql.Wrapper, javax.sql.CommonDataSource, javax.sql.DataSource, DataSourceInfo
public class DriverDataSourceInfo
- extends AbstractDataSource
Collects the info required to instantiate a DataSource from a JDBC Driver
Provides the DataSourceInfo factory method getDataSource which instantiates the DataSource
- Author:
- dberry
|
Constructor Summary |
DriverDataSourceInfo(java.lang.String driver,
java.lang.String url)
Creates a DriverDataSourceInfo from a Jdbc Driver |
DriverDataSourceInfo(java.lang.String driver,
java.lang.String url,
java.util.Properties properties)
Creates a DriverDataSourceInfo from a Jdbc Driver |
DriverDataSourceInfo(java.lang.String driver,
java.lang.String url,
java.lang.String username,
java.lang.String password)
Creates a DriverDataSourceInfo from a Jdbc Driver |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DriverDataSourceInfo
public DriverDataSourceInfo(java.lang.String driver,
java.lang.String url)
throws CpoException
- Creates a DriverDataSourceInfo from a Jdbc Driver
- Parameters:
driver - The text name of the driverurl - - The url that points to the database.
- Throws:
CpoException
DriverDataSourceInfo
public DriverDataSourceInfo(java.lang.String driver,
java.lang.String url,
java.util.Properties properties)
throws CpoException
- Creates a DriverDataSourceInfo 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
DriverDataSourceInfo
public DriverDataSourceInfo(java.lang.String driver,
java.lang.String url,
java.lang.String username,
java.lang.String password)
throws CpoException
- Creates a DriverDataSourceInfo 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 javax.sql.DataSource createDataSource()
throws CpoException
- Specified by:
createDataSource in class AbstractDataSourceInfo
- Throws:
CpoException
getConnection
public java.sql.Connection getConnection()
throws java.sql.SQLException
- Throws:
java.sql.SQLException
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
Copyright © 2012. All Rights Reserved.