com.github.smokestack.jdbc
Class MockDataSource
java.lang.Object
com.github.smokestack.jdbc.MockDataSource
- All Implemented Interfaces:
- DataSource
public class MockDataSource
- extends Object
- implements DataSource
- Author:
- bbrag
instance
public static final MockDataSource instance
- Public access to instance
getInstance
public static MockDataSource getInstance()
getConnection
public Connection getConnection()
throws SQLException
- Specified by:
getConnection
in interface DataSource
- Throws:
SQLException
_getConnection
public MockConnection _getConnection()
throws SQLException
- Throws:
SQLException
getConnection
public Connection getConnection(String username,
String password)
throws SQLException
- Specified by:
getConnection
in interface DataSource
- Throws:
SQLException
_getConnection
public MockConnection _getConnection(String username,
String password)
throws SQLException
- Throws:
SQLException
getLogWriter
public PrintWriter getLogWriter()
throws SQLException
- Specified by:
getLogWriter
in interface DataSource
- Throws:
SQLException
_getLogWriter
public PrintWriter _getLogWriter()
throws SQLException
- Throws:
SQLException
getLoginTimeout
public int getLoginTimeout()
throws SQLException
- Specified by:
getLoginTimeout
in interface DataSource
- Throws:
SQLException
_getLoginTimeout
public int _getLoginTimeout()
throws SQLException
- Throws:
SQLException
setLogWriter
public void setLogWriter(PrintWriter out)
throws SQLException
- Specified by:
setLogWriter
in interface DataSource
- Throws:
SQLException
_setLogWriter
public void _setLogWriter(PrintWriter out)
throws SQLException
- Throws:
SQLException
setLoginTimeout
public void setLoginTimeout(int seconds)
throws SQLException
- Specified by:
setLoginTimeout
in interface DataSource
- Throws:
SQLException
_setLoginTimeout
public void _setLoginTimeout(int seconds)
throws SQLException
- Throws:
SQLException
getMockConnections
public List<MockConnection> getMockConnections()
reset
public void reset()
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2009-2010 Smokestack. All Rights Reserved.