org.apache.openjpa.lib.jdbc
public abstract class DelegatingDataSource extends Object implements DataSource, Closeable
equals and
hashCode methods pass through to the base underlying data store.| Constructor and Description |
|---|
DelegatingDataSource(DataSource ds)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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) |
public DelegatingDataSource(DataSource ds)
public static DelegatingDataSource newInstance(DataSource ds)
protected abstract void enforceAbstract()
public DataSource getDelegate()
public DataSource getInnermostDelegate()
protected void appendInfo(StringBuffer buf)
public PrintWriter getLogWriter() throws SQLException
getLogWriter in interface CommonDataSourceSQLExceptionpublic void setLogWriter(PrintWriter out) throws SQLException
setLogWriter in interface CommonDataSourceSQLExceptionpublic int getLoginTimeout()
throws SQLException
getLoginTimeout in interface CommonDataSourceSQLExceptionpublic void setLoginTimeout(int timeout)
throws SQLException
setLoginTimeout in interface CommonDataSourceSQLExceptionpublic Connection getConnection() throws SQLException
getConnection in interface DataSourceSQLExceptionpublic Connection getConnection(String user, String pass) throws SQLException
getConnection in interface DataSourceSQLExceptionpublic void close()
throws Exception
public boolean isWrapperFor(Class iface)
isWrapperFor in interface WrapperCopyright © 2006-2013 Apache Software Foundation. All Rights Reserved.