java.lang.Object
com.aoapps.sql.wrapper.DriverWrapper
com.aoapps.sql.wrapper.Driver
- All Implemented Interfaces:
Driver
A registered driver that wraps connections obtained from other drivers.
- Author:
- AO Industries, Inc.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Deregisters the driver if currently registered.int
int
Gets the JDBC prefix used for this driver wrapper.protected String
Gets the full version string, which may be used for the driver version meta data associated with connections.static boolean
register()
Registers the driver if not yet already registered.Methods inherited from class com.aoapps.sql.wrapper.DriverWrapper
acceptsURL, connect, getDriverMajorVersion, getDriverMinorVersion, getDriverName, getDriverVersion, getPropertyInfo, jdbcCompliant, newConnectionWrapper, onDeregister, toString, toWrappedUrl, toWrapperUrl, wrapConnection
-
Constructor Details
-
Driver
public Driver()Public constructor required for service loader.- See Also:
-
-
Method Details
-
register
Registers the driver if not yet already registered. This is done automatically during class initialization.- Returns:
true
when an new driver instance is registered, orfalse
when already registered.- Throws:
SQLException
- See Also:
-
deregister
Deregisters the driver if currently registered.- Returns:
true
when the driver instance is deregistered, orfalse
when nothing to deregister.- Throws:
SQLException
- See Also:
-
getUrlPrefix
Description copied from class:DriverWrapper
Gets the JDBC prefix used for this driver wrapper. This will be inserted after "jdbc:" in the wrapped driver URL. For example, "jdbc:prefix:postgresql://host/database"- Specified by:
getUrlPrefix
in classDriverWrapper
-
getVersion
Description copied from class:DriverWrapper
Gets the full version string, which may be used for the driver version meta data associated with connections.- Specified by:
getVersion
in classDriverWrapper
- See Also:
-
getMajorVersion
public int getMajorVersion()- Specified by:
getMajorVersion
in interfaceDriver
- Specified by:
getMajorVersion
in classDriverWrapper
-
getMinorVersion
public int getMinorVersion()- Specified by:
getMinorVersion
in interfaceDriver
- Specified by:
getMinorVersion
in classDriverWrapper
-
getParentLogger
- Specified by:
getParentLogger
in interfaceDriver
- Specified by:
getParentLogger
in classDriverWrapper
-