- java.lang.Object
-
- org.tentackle.sql.DynamicDriver
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanacceptsURL(String url)Connectionconnect(String url, Properties info)intgetMajorVersion()intgetMinorVersion()LoggergetParentLogger()DriverPropertyInfo[]getPropertyInfo(String url, Properties info)booleanjdbcCompliant()static Driverload(String name)Loads a JDBC driver dynamically.
The name consists of the driver's classname, followed by a colon, followed by the URL to load it.
Example:static voidunload(Driver driver)Unloads the driver.
-
-
-
Method Detail
-
load
public static Driver load(String name)
Loads a JDBC driver dynamically.
The name consists of the driver's classname, followed by a colon, followed by the URL to load it.
Example:org.postgresql.Driver:jar:file:/usr/share/java/postgresql.jar!/
- Parameters:
name- the driver classname and loading url- Returns:
- the loaded driver, never null
-
unload
public static void unload(Driver driver)
Unloads the driver.- Parameters:
driver- the driver previously loaded viaload(String)
-
connect
public Connection connect(String url, Properties info) throws SQLException
- Specified by:
connectin interfaceDriver- Throws:
SQLException
-
acceptsURL
public boolean acceptsURL(String url) throws SQLException
- Specified by:
acceptsURLin interfaceDriver- Throws:
SQLException
-
getPropertyInfo
public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException
- Specified by:
getPropertyInfoin interfaceDriver- Throws:
SQLException
-
getMajorVersion
public int getMajorVersion()
- Specified by:
getMajorVersionin interfaceDriver
-
getMinorVersion
public int getMinorVersion()
- Specified by:
getMinorVersionin interfaceDriver
-
jdbcCompliant
public boolean jdbcCompliant()
- Specified by:
jdbcCompliantin interfaceDriver
-
getParentLogger
public Logger getParentLogger() throws SQLFeatureNotSupportedException
- Specified by:
getParentLoggerin interfaceDriver- Throws:
SQLFeatureNotSupportedException
-
-