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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanDeregisters the driver if currently registered.intintGets the JDBC prefix used for this driver wrapper.protected StringGets the full version string, which may be used for the driver version meta data associated with connections.static booleanregister()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:
truewhen an new driver instance is registered, orfalsewhen already registered.- Throws:
SQLException- See Also:
-
deregister
Deregisters the driver if currently registered.- Returns:
truewhen the driver instance is deregistered, orfalsewhen nothing to deregister.- Throws:
SQLException- See Also:
-
getUrlPrefix
Description copied from class:DriverWrapperGets 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:
getUrlPrefixin classDriverWrapper
-
getVersion
Description copied from class:DriverWrapperGets the full version string, which may be used for the driver version meta data associated with connections.- Specified by:
getVersionin classDriverWrapper- See Also:
-
getMajorVersion
public int getMajorVersion()- Specified by:
getMajorVersionin interfaceDriver- Specified by:
getMajorVersionin classDriverWrapper
-
getMinorVersion
public int getMinorVersion()- Specified by:
getMinorVersionin interfaceDriver- Specified by:
getMinorVersionin classDriverWrapper
-
getParentLogger
- Specified by:
getParentLoggerin interfaceDriver- Specified by:
getParentLoggerin classDriverWrapper
-
