jxDBCon 0.9z

org.sourceforge.jxdbcon
Class XAbstractDataSource

java.lang.Object
  |
  +--org.sourceforge.jxdbcon.XAbstractDataSource
All Implemented Interfaces:
DataSource, InfoKeys, Serializable
Direct Known Subclasses:
PGDataSource

public abstract class XAbstractDataSource
extends Object
implements DataSource, InfoKeys, Serializable

XAbstractDataSource implements generics of the DataSource interface.

Version:
$Revision: 1.4 $, $Date: 2002/03/16 01:26:07 $
Author:
Keve Müller
See Also:
Serialized Form

Nested Class Summary
static class XAbstractDataSource.ObjectFactory
           
static class XAbstractDataSource.StateFactory
           
 
Field Summary
protected  Properties info
          The properties to use when creating the connection.
protected  int loginTimeout
           
protected  PrintWriter logWriter
           
 
Fields inherited from interface org.sourceforge.jxdbcon.InfoKeys
CATALOG, DESCRIPTION, DRIVER, HOST, PASSWORD, PORT, SUBDRIVER, USER
 
Constructor Summary
protected XAbstractDataSource()
           
 
Method Summary
 Connection getConnection()
           
 Connection getConnection(String username, String password)
           
 int getLoginTimeout()
           
 PrintWriter getLogWriter()
           
protected abstract  AbstractConnection internalGet(Properties info)
          Return a Connection, use the supplied properties as a hint.
 void setCatalog(String catalog)
           
 void setDescription(String description)
           
 void setHost(String host)
           
 void setLoginTimeout(int seconds)
           
 void setLogWriter(PrintWriter out)
           
 void setPassword(String password)
           
 void setPort(int port)
           
 void setUser(String user)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

info

protected Properties info
The properties to use when creating the connection.


loginTimeout

protected int loginTimeout

logWriter

protected PrintWriter logWriter
Constructor Detail

XAbstractDataSource

protected XAbstractDataSource()
Method Detail

getConnection

public Connection getConnection()
                         throws SQLException
Specified by:
getConnection in interface DataSource
SQLException

getConnection

public Connection getConnection(String username,
                                String password)
                         throws SQLException
Specified by:
getConnection in interface DataSource
SQLException

getLoginTimeout

public final int getLoginTimeout()
Specified by:
getLoginTimeout in interface DataSource

getLogWriter

public final PrintWriter getLogWriter()
Specified by:
getLogWriter in interface DataSource

internalGet

protected abstract AbstractConnection internalGet(Properties info)
                                           throws SQLException
Return a Connection, use the supplied properties as a hint. The properties passed to the AbstractConnection.open will be the same.

SQLException

setCatalog

public final void setCatalog(String catalog)

setDescription

public final void setDescription(String description)

setHost

public final void setHost(String host)

setLoginTimeout

public final void setLoginTimeout(int seconds)
Specified by:
setLoginTimeout in interface DataSource

setLogWriter

public final void setLogWriter(PrintWriter out)
Specified by:
setLogWriter in interface DataSource

setPassword

public final void setPassword(String password)

setPort

public final void setPort(int port)

setUser

public final void setUser(String user)

jxDBCon 0.9z

Copyright © 2001,2002 Keve Müller; see LICENSE file for details.