public class DataSourceWrapper
extends Object
implements javax.sql.DataSource
Constructor and Description |
---|
DataSourceWrapper(javax.sql.DataSource dataSource) |
Modifier and Type | Method and Description |
---|---|
Connection |
getConnection() |
Connection |
getConnection(String username,
String password) |
int |
getLoginTimeout() |
PrintWriter |
getLogWriter() |
Logger |
getParentLogger() |
javax.sql.DataSource |
getWrappedDataSource() |
boolean |
isWrapperFor(Class<?> clazz) |
void |
setLoginTimeout(int seconds) |
void |
setLogWriter(PrintWriter out) |
void |
setWrappedDataSource(javax.sql.DataSource wrappedDataSource) |
<T> T |
unwrap(Class<T> clazz) |
public Connection getConnection() throws SQLException
getConnection
in interface javax.sql.DataSource
SQLException
public Connection getConnection(String username, String password) throws SQLException
getConnection
in interface javax.sql.DataSource
SQLException
public int getLoginTimeout() throws SQLException
getLoginTimeout
in interface javax.sql.CommonDataSource
SQLException
public PrintWriter getLogWriter() throws SQLException
getLogWriter
in interface javax.sql.CommonDataSource
SQLException
public Logger getParentLogger()
getParentLogger
in interface javax.sql.CommonDataSource
public javax.sql.DataSource getWrappedDataSource()
public boolean isWrapperFor(Class<?> clazz)
isWrapperFor
in interface Wrapper
public void setLoginTimeout(int seconds) throws SQLException
setLoginTimeout
in interface javax.sql.CommonDataSource
SQLException
public void setLogWriter(PrintWriter out) throws SQLException
setLogWriter
in interface javax.sql.CommonDataSource
SQLException
public void setWrappedDataSource(javax.sql.DataSource wrappedDataSource)
public <T> T unwrap(Class<T> clazz) throws SQLException
unwrap
in interface Wrapper
SQLException