|
||||||||||
| 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.
| Field Summary | |
|---|---|
(package private) static Constructor<DelegatingDataSource> |
concreteImpl
|
| Constructor Summary | |
|---|---|
DelegatingDataSource(DataSource ds)
Constructor. |
|
| Method Summary | |
|---|---|
protected void |
appendInfo(StringBuffer buf)
|
void |
close()
|
protected abstract void |
enforceAbstract()
Marker to enforce that subclasses of this class are abstract. |
boolean |
equals(Object other)
|
Connection |
getConnection()
|
Connection |
getConnection(String user,
String pass)
|
DataSource |
getDelegate()
Return the wrapped data source. |
DataSource |
getInnermostDelegate()
Return the inner-most wrapped delegate. |
int |
getLoginTimeout()
|
PrintWriter |
getLogWriter()
|
int |
hashCode()
|
boolean |
isWrapperFor(Class iface)
|
static DelegatingDataSource |
newInstance(DataSource ds)
Constructor for the concrete implementation of this abstract class. |
void |
setLoginTimeout(int timeout)
|
void |
setLogWriter(PrintWriter out)
|
String |
toString()
|
Object |
unwrap(Class iface)
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
static final Constructor<DelegatingDataSource> concreteImpl
| Constructor Detail |
|---|
public DelegatingDataSource(DataSource ds)
| Method Detail |
|---|
public static DelegatingDataSource newInstance(DataSource ds)
protected abstract void enforceAbstract()
public DataSource getDelegate()
public DataSource getInnermostDelegate()
public int hashCode()
hashCode in class Objectpublic boolean equals(Object other)
equals in class Objectpublic String toString()
toString in class Objectprotected void appendInfo(StringBuffer buf)
public PrintWriter getLogWriter()
throws SQLException
getLogWriter in interface CommonDataSourceSQLException
public void setLogWriter(PrintWriter out)
throws SQLException
setLogWriter in interface CommonDataSourceSQLException
public int getLoginTimeout()
throws SQLException
getLoginTimeout in interface CommonDataSourceSQLException
public void setLoginTimeout(int timeout)
throws SQLException
setLoginTimeout in interface CommonDataSourceSQLException
public Connection getConnection()
throws SQLException
getConnection in interface DataSourceSQLException
public Connection getConnection(String user,
String pass)
throws SQLException
getConnection in interface DataSourceSQLException
public void close()
throws Exception
close in interface CloseableExceptionpublic boolean isWrapperFor(Class iface)
isWrapperFor in interface Wrapperpublic Object unwrap(Class iface)
unwrap in interface Wrapper
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||