org.osjava.sj.loader
Class SJDataSource

java.lang.Object
  extended byorg.osjava.sj.loader.SJDataSource
All Implemented Interfaces:
javax.sql.DataSource

public class SJDataSource
extends java.lang.Object
implements javax.sql.DataSource

A basic implementation of a DataSource.


Constructor Summary
SJDataSource(java.lang.String driver, java.lang.String url, java.lang.String username, java.lang.String password, java.lang.String pool)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.sql.Connection getConnection()
           
 java.sql.Connection getConnection(java.lang.String username, java.lang.String password)
           
 int getLoginTimeout()
           
 java.io.PrintWriter getLogWriter()
           
 int hashCode()
           
 void setLoginTimeout(int timeout)
           
 void setLogWriter(java.io.PrintWriter pw)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SJDataSource

public SJDataSource(java.lang.String driver,
                    java.lang.String url,
                    java.lang.String username,
                    java.lang.String password,
                    java.lang.String pool)
Method Detail

getConnection

public java.sql.Connection getConnection()
                                  throws java.sql.SQLException
Specified by:
getConnection in interface javax.sql.DataSource
Throws:
java.sql.SQLException

getConnection

public java.sql.Connection getConnection(java.lang.String username,
                                         java.lang.String password)
                                  throws java.sql.SQLException
Specified by:
getConnection in interface javax.sql.DataSource
Throws:
java.sql.SQLException

getLogWriter

public java.io.PrintWriter getLogWriter()
                                 throws java.sql.SQLException
Specified by:
getLogWriter in interface javax.sql.DataSource
Throws:
java.sql.SQLException

getLoginTimeout

public int getLoginTimeout()
                    throws java.sql.SQLException
Specified by:
getLoginTimeout in interface javax.sql.DataSource
Throws:
java.sql.SQLException

setLogWriter

public void setLogWriter(java.io.PrintWriter pw)
                  throws java.sql.SQLException
Specified by:
setLogWriter in interface javax.sql.DataSource
Throws:
java.sql.SQLException

setLoginTimeout

public void setLoginTimeout(int timeout)
                     throws java.sql.SQLException
Specified by:
setLoginTimeout in interface javax.sql.DataSource
Throws:
java.sql.SQLException

toString

public java.lang.String toString()

equals

public boolean equals(java.lang.Object obj)

hashCode

public int hashCode()


Copyright © 2003-2007 OSJava. All Rights Reserved.