org.synchronoss.cpo.jdbc
Class DriverDataSourceInfo

Package class diagram package DriverDataSourceInfo
java.lang.Object
  extended by org.synchronoss.cpo.jdbc.AbstractDataSourceInfo
      extended by org.synchronoss.cpo.jdbc.AbstractDataSource
          extended by 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
 
Method Summary
protected  javax.sql.DataSource createDataSource()
           
 java.sql.Connection getConnection()
           
 java.lang.String toString()
           
 
Methods inherited from class org.synchronoss.cpo.jdbc.AbstractDataSource
getConnection, getLoginTimeout, getLogWriter, isWrapperFor, setLoginTimeout, setLogWriter, unwrap
 
Methods inherited from class org.synchronoss.cpo.jdbc.AbstractDataSourceInfo
getDataSource, getDataSourceName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 driver
url - - 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 driver
url - - 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 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 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.