org.synchronoss.cpo.jdbc
Class DriverJdbcDataSourceInfo

java.lang.Object
  extended by org.synchronoss.cpo.AbstractDataSourceInfo
      extended by org.synchronoss.cpo.jdbc.AbstractJdbcDataSourceInfo
          extended by org.synchronoss.cpo.jdbc.AbstractJdbcDataSource
              extended by 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

Constructor Summary
DriverJdbcDataSourceInfo(String driver, String url)
          Creates a DriverJdbcDataSourceInfo from a Jdbc Driver
DriverJdbcDataSourceInfo(String driver, String url, Properties properties)
          Creates a DriverJdbcDataSourceInfo from a Jdbc Driver
DriverJdbcDataSourceInfo(String driver, String url, String username, String password)
          Creates a DriverJdbcDataSourceInfo from a Jdbc Driver
 
Method Summary
protected  DataSource createDataSource()
           
 Connection getConnection()
           
 String toString()
           
 
Methods inherited from class org.synchronoss.cpo.jdbc.AbstractJdbcDataSource
getConnection, getLoginTimeout, getLogWriter, isWrapperFor, setLoginTimeout, setLogWriter, unwrap
 
Methods inherited from class org.synchronoss.cpo.AbstractDataSourceInfo
getDataSource, getDataSourceName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DriverJdbcDataSourceInfo

public DriverJdbcDataSourceInfo(String driver,
                                String url)
                         throws CpoException
Creates a DriverJdbcDataSourceInfo from a Jdbc Driver

Parameters:
driver - The text name of the driver
url - - 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 driver
url - - 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 driver
url - - The url that points to the database.
username - - The username for connecting to the database
password - - The password for connectinf to the database
Throws:
CpoException
Method Detail

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.