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.DataSourceSQLExceptionpublic Connection getConnection(String username,
String password)
throws SQLException
getConnection in interface javax.sql.DataSourceSQLExceptionpublic int getLoginTimeout()
throws SQLException
getLoginTimeout in interface javax.sql.CommonDataSourceSQLExceptionpublic PrintWriter getLogWriter()
throws SQLException
getLogWriter in interface javax.sql.CommonDataSourceSQLExceptionpublic Logger getParentLogger()
getParentLogger in interface javax.sql.CommonDataSourcepublic javax.sql.DataSource getWrappedDataSource()
public boolean isWrapperFor(Class<?> clazz)
isWrapperFor in interface Wrapperpublic void setLoginTimeout(int seconds)
throws SQLException
setLoginTimeout in interface javax.sql.CommonDataSourceSQLExceptionpublic void setLogWriter(PrintWriter out)
throws SQLException
setLogWriter in interface javax.sql.CommonDataSourceSQLExceptionpublic void setWrappedDataSource(javax.sql.DataSource wrappedDataSource)
public <T> T unwrap(Class<T> clazz)
throws SQLException
unwrap in interface WrapperSQLException