public class MockDataSource extends Object implements DataSource
| Constructor and Description |
|---|
MockDataSource() |
| Modifier and Type | Method and Description |
|---|---|
Connection |
getConnection() |
Connection |
getConnection(String username,
String password) |
int |
getLoginTimeout() |
PrintWriter |
getLogWriter() |
Logger |
getParentLogger()
NOTE: JDK7+ new feature
|
boolean |
isWrapperFor(Class<?> iface) |
void |
setLoginTimeout(int seconds) |
void |
setLogWriter(PrintWriter out) |
<T> T |
unwrap(Class<T> iface) |
public Logger getParentLogger()
getParentLogger in interface CommonDataSourcepublic Connection getConnection() throws SQLException
getConnection in interface DataSourceSQLExceptionDataSource.getConnection()public Connection getConnection(String username, String password) throws SQLException
getConnection in interface DataSourceSQLExceptionDataSource.getConnection(java.lang.String, java.lang.String)public PrintWriter getLogWriter() throws SQLException
getLogWriter in interface CommonDataSourceSQLExceptionCommonDataSource.getLogWriter()public int getLoginTimeout()
throws SQLException
getLoginTimeout in interface CommonDataSourceSQLExceptionCommonDataSource.getLoginTimeout()public void setLogWriter(PrintWriter out) throws SQLException
setLogWriter in interface CommonDataSourceSQLExceptionCommonDataSource.setLogWriter(java.io.PrintWriter)public void setLoginTimeout(int seconds)
throws SQLException
setLoginTimeout in interface CommonDataSourceSQLExceptionCommonDataSource.setLoginTimeout(int)public boolean isWrapperFor(Class<?> iface) throws SQLException
isWrapperFor in interface WrapperSQLExceptionpublic <T> T unwrap(Class<T> iface) throws SQLException
unwrap in interface WrapperSQLExceptionCopyright © 1995-2015 Webtide. All Rights Reserved.