public abstract class DelegatingDataSource extends java.lang.Object implements javax.sql.DataSource, Closeable
equals
and
hashCode
methods pass through to the base underlying data store.Constructor and Description |
---|
DelegatingDataSource(javax.sql.DataSource ds)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
appendInfo(java.lang.StringBuffer buf) |
void |
close() |
protected abstract void |
enforceAbstract()
Marker to enforce that subclasses of this class are abstract.
|
boolean |
equals(java.lang.Object other) |
java.sql.Connection |
getConnection() |
java.sql.Connection |
getConnection(java.lang.String user,
java.lang.String pass) |
javax.sql.DataSource |
getDelegate()
Return the wrapped data source.
|
javax.sql.DataSource |
getInnermostDelegate()
Return the inner-most wrapped delegate.
|
int |
getLoginTimeout() |
java.io.PrintWriter |
getLogWriter() |
int |
hashCode() |
boolean |
isWrapperFor(java.lang.Class iface) |
static DelegatingDataSource |
newInstance(javax.sql.DataSource ds)
Constructor for the concrete implementation of this abstract class.
|
void |
setLoginTimeout(int timeout) |
void |
setLogWriter(java.io.PrintWriter out) |
java.lang.String |
toString() |
java.lang.Object |
unwrap(java.lang.Class iface) |
public DelegatingDataSource(javax.sql.DataSource ds)
public static DelegatingDataSource newInstance(javax.sql.DataSource ds)
protected abstract void enforceAbstract()
public javax.sql.DataSource getDelegate()
public javax.sql.DataSource getInnermostDelegate()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
protected void appendInfo(java.lang.StringBuffer buf)
public java.io.PrintWriter getLogWriter() throws java.sql.SQLException
getLogWriter
in interface javax.sql.CommonDataSource
java.sql.SQLException
public void setLogWriter(java.io.PrintWriter out) throws java.sql.SQLException
setLogWriter
in interface javax.sql.CommonDataSource
java.sql.SQLException
public int getLoginTimeout() throws java.sql.SQLException
getLoginTimeout
in interface javax.sql.CommonDataSource
java.sql.SQLException
public void setLoginTimeout(int timeout) throws java.sql.SQLException
setLoginTimeout
in interface javax.sql.CommonDataSource
java.sql.SQLException
public java.sql.Connection getConnection() throws java.sql.SQLException
getConnection
in interface javax.sql.DataSource
java.sql.SQLException
public java.sql.Connection getConnection(java.lang.String user, java.lang.String pass) throws java.sql.SQLException
getConnection
in interface javax.sql.DataSource
java.sql.SQLException
public void close() throws java.lang.Exception
public boolean isWrapperFor(java.lang.Class iface)
isWrapperFor
in interface java.sql.Wrapper
public java.lang.Object unwrap(java.lang.Class iface)
unwrap
in interface java.sql.Wrapper