|
|||||||||
| Home >> All >> jdbc >> [ db overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
jdbc.db
Class TestDriverImpl

java.lang.Objectjdbc.db.TestDriverImpl
- All Implemented Interfaces:
- java.sql.Driver
- public final class TestDriverImpl
- extends java.lang.Object
- implements java.sql.Driver
- extends java.lang.Object
The test jdbc driver.
The number of connections created is across all TestDriverImpl instances
| Field Summary | |
private TestConnectionImpl |
_lastConnection
The last connection returned |
private static int |
_numberOfCreatedConnections
The number of connections created |
private static java.sql.DriverPropertyInfo[] |
emptyDriverPropertyInfo
Empty driver property array |
private static int |
TEST_MAJOR_VERSION
The Test driver major version |
private static int |
TEST_MINOR_VERSION
The Test driver minor version |
static java.lang.String |
TEST_URL_START
The start of a valid test url (header + subprotocol) |
| Constructor Summary | |
TestDriverImpl()
The default constructor |
|
| Method Summary | |
boolean |
acceptsURL(java.lang.String url)
Returns true if the driver thinks that it can open a connection to the given URL. |
void |
clearNumberOfCreatedConnections()
Clear the number of connections created by this driver instance. |
java.sql.Connection |
connect(java.lang.String url,
java.util.Properties info)
Return a Connection object that represents a
connection to the URL. |
TestConnectionImpl |
getLastConnection()
Return the last connection that was created. |
int |
getMajorVersion()
Gets the driver's major version number. |
int |
getMinorVersion()
Gets the driver's minor version number. |
int |
getNumberOfCreatedConnections()
Return the number of connections created by this driver instance. |
java.sql.DriverPropertyInfo[] |
getPropertyInfo(java.lang.String url,
java.util.Properties info)
Return an empty DriverPropertyInfo array. |
boolean |
jdbcCompliant()
Test driver is not jdbc compliant (not yet at least :-)). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
TEST_URL_START
public static final java.lang.String TEST_URL_START
- The start of a valid test url (header + subprotocol)
- See Also:
- Constant Field Values
emptyDriverPropertyInfo
private static final java.sql.DriverPropertyInfo[] emptyDriverPropertyInfo
- Empty driver property array
TEST_MAJOR_VERSION
private static final int TEST_MAJOR_VERSION
- The Test driver major version
- See Also:
- Constant Field Values
_numberOfCreatedConnections
private static int _numberOfCreatedConnections
- The number of connections created
TEST_MINOR_VERSION
private static final int TEST_MINOR_VERSION
- The Test driver minor version
- See Also:
- Constant Field Values
_lastConnection
private TestConnectionImpl _lastConnection
- The last connection returned
| Constructor Detail |
TestDriverImpl
public TestDriverImpl()
- The default constructor
| Method Detail |
connect
public java.sql.Connection connect(java.lang.String url, java.util.Properties info) throws java.sql.SQLException
- Return a
Connectionobject that represents a connection to the URL.- Specified by:
connectin interfacejava.sql.Driver
getLastConnection
public TestConnectionImpl getLastConnection()
- Return the last connection that was created.
Can be null if no connections were created.
getNumberOfCreatedConnections
public int getNumberOfCreatedConnections()
- Return the number of connections created by
this driver instance.
clearNumberOfCreatedConnections
public void clearNumberOfCreatedConnections()
- Clear the number of connections created by
this driver instance.
acceptsURL
public boolean acceptsURL(java.lang.String url) throws java.sql.SQLException
- Returns true if the driver thinks that it can open a connection
to the given URL.
- Specified by:
acceptsURLin interfacejava.sql.Driver
getPropertyInfo
public java.sql.DriverPropertyInfo[] getPropertyInfo(java.lang.String url, java.util.Properties info) throws java.sql.SQLException
- Return an empty DriverPropertyInfo array.
- Specified by:
getPropertyInfoin interfacejava.sql.Driver
getMajorVersion
public int getMajorVersion()
- Gets the driver's major version number.
- Specified by:
getMajorVersionin interfacejava.sql.Driver
getMinorVersion
public int getMinorVersion()
- Gets the driver's minor version number.
- Specified by:
getMinorVersionin interfacejava.sql.Driver
jdbcCompliant
public boolean jdbcCompliant()
- Test driver is not jdbc compliant (not yet at least :-)).
- Specified by:
jdbcCompliantin interfacejava.sql.Driver
|
|||||||||
| Home >> All >> jdbc >> [ db overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
jdbc.db.TestDriverImpl