public class Driver extends Object implements Driver
Class.forName("org.h2.Driver");
Connection conn = DriverManager.getConnection(
"jdbc:h2:˜/test", "sa", "sa");
| Constructor and Description |
|---|
Driver() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptsURL(String url)
Check if the driver understands this URL.
|
Connection |
connect(String url,
Properties info)
Open a database connection.
|
int |
getMajorVersion()
Get the major version number of the driver.
|
int |
getMinorVersion()
Get the minor version number of the driver.
|
DriverPropertyInfo[] |
getPropertyInfo(String url,
Properties info)
Get the list of supported properties.
|
boolean |
jdbcCompliant()
Check if this driver is compliant to the JDBC specification.
|
static Driver |
load()
INTERNAL
|
static void |
setDefaultConnection(Connection c)
INTERNAL
|
static void |
unload()
INTERNAL
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetParentLoggerpublic Connection connect(String url, Properties info) throws SQLException
connect in interface Driverurl - the database URLinfo - the connection propertiesSQLExceptionpublic boolean acceptsURL(String url)
acceptsURL in interface Driverurl - the database URLpublic int getMajorVersion()
getMajorVersion in interface Driverpublic int getMinorVersion()
getMinorVersion in interface Driverpublic DriverPropertyInfo[] getPropertyInfo(String url, Properties info)
getPropertyInfo in interface Driverurl - the database URLinfo - the connection propertiespublic boolean jdbcCompliant()
jdbcCompliant in interface Driverpublic static Driver load()
public static void unload()
public static void setDefaultConnection(Connection c)
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.