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