com.solarmetric.jdbc
Class DelegatingDataSource
java.lang.Object
|
+--com.solarmetric.jdbc.DelegatingDataSource
- All Implemented Interfaces:
- com.solarmetric.util.Closeable, DataSource
- public class DelegatingDataSource
- extends Object
- implements DataSource, com.solarmetric.util.Closeable
Wrapper around an existing data source. Subclasses can override the
methods whose behavior they mean to change. The equals
and
hashCode
methods pass through to the base underlying data
store.
DelegatingDataSource
public DelegatingDataSource(DataSource ds)
- Constructor. Supply wrapped data source.
getDelegate
public DataSource getDelegate()
- Return the wrapped data source.
getInnermostDelegate
public DataSource getInnermostDelegate()
- Return the inner-most wrapped delegate.
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object other)
- Overrides:
equals
in class Object
toString
public String toString()
- Overrides:
toString
in class Object
appendInfo
protected void appendInfo(StringBuffer buf)
getLogWriter
public PrintWriter getLogWriter()
throws SQLException
- Specified by:
getLogWriter
in interface DataSource
setLogWriter
public void setLogWriter(PrintWriter out)
throws SQLException
- Specified by:
setLogWriter
in interface DataSource
getLoginTimeout
public int getLoginTimeout()
throws SQLException
- Specified by:
getLoginTimeout
in interface DataSource
setLoginTimeout
public void setLoginTimeout(int timeout)
throws SQLException
- Specified by:
setLoginTimeout
in interface DataSource
getConnection
public Connection getConnection()
throws SQLException
- Specified by:
getConnection
in interface DataSource
getConnection
public Connection getConnection(String user,
String pass)
throws SQLException
- Specified by:
getConnection
in interface DataSource
close
public void close()
throws Exception
- Specified by:
close
in interface com.solarmetric.util.Closeable
Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.