|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.openjpa.lib.jdbc.DelegatingDataSource
public abstract class DelegatingDataSource
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.
| Constructor Summary | |
|---|---|
DelegatingDataSource(javax.sql.DataSource ds)
Constructor. |
|
| Method Summary | |
|---|---|
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)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DelegatingDataSource(javax.sql.DataSource ds)
| Method Detail |
|---|
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.Objectpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectprotected void appendInfo(java.lang.StringBuffer buf)
public java.io.PrintWriter getLogWriter()
throws java.sql.SQLException
getLogWriter in interface javax.sql.CommonDataSourcejava.sql.SQLException
public void setLogWriter(java.io.PrintWriter out)
throws java.sql.SQLException
setLogWriter in interface javax.sql.CommonDataSourcejava.sql.SQLException
public int getLoginTimeout()
throws java.sql.SQLException
getLoginTimeout in interface javax.sql.CommonDataSourcejava.sql.SQLException
public void setLoginTimeout(int timeout)
throws java.sql.SQLException
setLoginTimeout in interface javax.sql.CommonDataSourcejava.sql.SQLException
public java.sql.Connection getConnection()
throws java.sql.SQLException
getConnection in interface javax.sql.DataSourcejava.sql.SQLException
public java.sql.Connection getConnection(java.lang.String user,
java.lang.String pass)
throws java.sql.SQLException
getConnection in interface javax.sql.DataSourcejava.sql.SQLException
public void close()
throws java.lang.Exception
close in interface Closeablejava.lang.Exceptionpublic boolean isWrapperFor(java.lang.Class iface)
isWrapperFor in interface java.sql.Wrapperpublic java.lang.Object unwrap(java.lang.Class iface)
unwrap in interface java.sql.Wrapper
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||