planetj.database.connection
Class DataSourceWrapper

java.lang.Object
  |
  +--planetj.database.connection.DataSourceWrapper
All Implemented Interfaces:
DataEngineDataSource, javax.sql.DataSource

public class DataSourceWrapper
extends Object
implements DataEngineDataSource

Wraps a DataSource object in DataEngineDataSource interface


Constructor Summary
DataSourceWrapper(javax.sql.DataSource ds, String userID, String password)
          DataSourceWrapper constructor
 
Method Summary
 Connection getConnection()
          Gets a connection out of the proxied datasource.
 Connection getConnection(String sql)
          Gets a Connection which will be used to execute the specified SQL.
 Connection getConnection(String userID, String password)
          getConnection method comment.
 int getLoginTimeout()
          getLoginTimeout method comment.
 PrintWriter getLogWriter()
          getLogWriter method comment.
 void setLoginTimeout(int arg1)
          setLoginTimeout method comment.
 void setLogWriter(PrintWriter arg1)
          setLogWriter method comment.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataSourceWrapper

public DataSourceWrapper(javax.sql.DataSource ds,
                         String userID,
                         String password)
DataSourceWrapper constructor

Method Detail

getConnection

public Connection getConnection()
                         throws SQLException
Gets a connection out of the proxied datasource.

Specified by:
getConnection in interface javax.sql.DataSource
SQLException

getConnection

public Connection getConnection(String sql)
                         throws DataEngineException
Gets a Connection which will be used to execute the specified SQL. The returned Connection may be chosen from all of the available connections based on the SQL statement passed in

Specified by:
getConnection in interface DataEngineDataSource
DataEngineException

getConnection

public Connection getConnection(String userID,
                                String password)
                         throws SQLException
getConnection method comment.

Specified by:
getConnection in interface javax.sql.DataSource
SQLException

getLoginTimeout

public int getLoginTimeout()
                    throws SQLException
getLoginTimeout method comment.

Specified by:
getLoginTimeout in interface javax.sql.DataSource
SQLException

getLogWriter

public PrintWriter getLogWriter()
                         throws SQLException
getLogWriter method comment.

Specified by:
getLogWriter in interface javax.sql.DataSource
SQLException

setLoginTimeout

public void setLoginTimeout(int arg1)
                     throws SQLException
setLoginTimeout method comment.

Specified by:
setLoginTimeout in interface javax.sql.DataSource
SQLException

setLogWriter

public void setLogWriter(PrintWriter arg1)
                  throws SQLException
setLogWriter method comment.

Specified by:
setLogWriter in interface javax.sql.DataSource
SQLException