com.github.smokestack.jdbc
Class MockDriver

java.lang.Object
  extended by com.github.smokestack.jdbc.MockDriver
All Implemented Interfaces:
Driver

public class MockDriver
extends Object
implements Driver

Author:
gliptak

Field Summary
static MockDriver instance
          Public access to instance
 
Constructor Summary
MockDriver()
           
 
Method Summary
 boolean _acceptsURL(String url)
           
 MockConnection _connect(String url, Properties info)
           
 boolean _jdbcCompliant()
           
 boolean acceptsURL(String url)
           
 Connection connect(String url, Properties info)
           
 int getMajorVersion()
           
 int getMinorVersion()
           
 List<MockConnection> getMockConnections()
           
 DriverPropertyInfo[] getPropertyInfo(String url, Properties info)
           
 boolean jdbcCompliant()
           
static Driver load()
           
 void reset()
          Reset to original state
 String toString()
           
static void unload()
          For use with ClassLoader based environments
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

instance

public static final MockDriver instance
Public access to instance

Constructor Detail

MockDriver

public MockDriver()
Method Detail

acceptsURL

public boolean acceptsURL(String url)
                   throws SQLException
Specified by:
acceptsURL in interface Driver
Throws:
SQLException

_acceptsURL

public boolean _acceptsURL(String url)
                    throws SQLException
Throws:
SQLException

connect

public Connection connect(String url,
                          Properties info)
                   throws SQLException
Specified by:
connect in interface Driver
Throws:
SQLException

_connect

public MockConnection _connect(String url,
                               Properties info)
                        throws SQLException
Throws:
SQLException

getMajorVersion

public int getMajorVersion()
Specified by:
getMajorVersion in interface Driver

getMinorVersion

public int getMinorVersion()
Specified by:
getMinorVersion in interface Driver

getPropertyInfo

public DriverPropertyInfo[] getPropertyInfo(String url,
                                            Properties info)
                                     throws SQLException
Specified by:
getPropertyInfo in interface Driver
Throws:
SQLException

jdbcCompliant

public boolean jdbcCompliant()
Specified by:
jdbcCompliant in interface Driver

_jdbcCompliant

public boolean _jdbcCompliant()

load

public static Driver load()

unload

public static void unload()
For use with ClassLoader based environments


getMockConnections

public List<MockConnection> getMockConnections()
Returns:
the mockConnections

reset

public void reset()
Reset to original state


toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009-2010 Smokestack. All Rights Reserved.