public class DynamicDriver
extends java.lang.Object
implements java.sql.Driver
Title: Dynamic driver
Description: Support for loading a DB driver at runtime. Implements the java.sql.Driver interface. See the interface documentation for descriptions of the methods.
Copyright: Copyright (c) 2004-2014, David Read
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Modifier and Type | Field and Description |
---|---|
private java.sql.Driver |
driver
The driver for accessing the database
|
Constructor and Description |
---|
DynamicDriver(java.sql.Driver d)
Creates a DynamicDriver instance from a Driver
|
Modifier and Type | Method and Description |
---|---|
boolean |
acceptsURL(java.lang.String url) |
java.sql.Connection |
connect(java.lang.String url,
java.util.Properties prop) |
int |
getMajorVersion() |
int |
getMinorVersion() |
java.sql.DriverPropertyInfo[] |
getPropertyInfo(java.lang.String url,
java.util.Properties prop) |
boolean |
jdbcCompliant() |
public DynamicDriver(java.sql.Driver d)
d
- The driver to be createdpublic boolean acceptsURL(java.lang.String url) throws java.sql.SQLException
acceptsURL
in interface java.sql.Driver
java.sql.SQLException
public java.sql.Connection connect(java.lang.String url, java.util.Properties prop) throws java.sql.SQLException
connect
in interface java.sql.Driver
java.sql.SQLException
public java.sql.DriverPropertyInfo[] getPropertyInfo(java.lang.String url, java.util.Properties prop) throws java.sql.SQLException
getPropertyInfo
in interface java.sql.Driver
java.sql.SQLException
public int getMajorVersion()
getMajorVersion
in interface java.sql.Driver
public int getMinorVersion()
getMinorVersion
in interface java.sql.Driver
public boolean jdbcCompliant()
jdbcCompliant
in interface java.sql.Driver