Package net.postgis.jdbc
Class DriverWrapperLW
java.lang.Object
org.postgresql.Driver
net.postgis.jdbc.DriverWrapper
net.postgis.jdbc.DriverWrapperLW
- All Implemented Interfaces:
Driver
DriverWrapperLW
Wraps the PostGreSQL Driver to transparently add the PostGIS Object Classes.
This avoids the need of explicit addDataType() calls from the driver users
side.
This DriverWrapper subclass always uses hex encoded EWKB as canonical text
representation, and thus only works against PostGIS 1.x servers and newer.
For usage notes, see DriverWrapper class, but use "jdbc:postgresql_lwgis:" as
JDBC url prefix and net.postgis.jdbc.DriverWrapperLW as driver class.
- Author:
- Markus Schaber <[email protected]>
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class net.postgis.jdbc.DriverWrapper
DriverWrapper.TypesAdder, DriverWrapper.TypesAdder72, DriverWrapper.TypesAdder74, DriverWrapper.TypesAdder80 -
Field Summary
FieldsFields inherited from class net.postgis.jdbc.DriverWrapper
logger, POSTGIS_PROTOCOL, POSTGRES_PROTOCOL, REVISION, ta72, ta74, ta80, typesAdder -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringstatic StringReturns our own CVS version plus postgres Versionprotected booleanuseLW(Connection result) Do we have HexWKB as well known text representation - to be overridden by subclasses.Methods inherited from class net.postgis.jdbc.DriverWrapper
acceptsURL, addGISTypes, addGISTypes72, addGISTypes80, connect, getParentLogger, getTypesAdder, mangleURLMethods inherited from class org.postgresql.Driver
deregister, getMajorVersion, getMinorVersion, getPropertyInfo, getSharedTimer, isRegistered, jdbcCompliant, notImplemented, parseURL, register
-
Field Details
-
POSTGIS_LWPROTOCOL
- See Also:
-
REVISIONLW
- See Also:
-
-
Constructor Details
-
DriverWrapperLW
Default constructor.- Throws:
SQLException- when a SQLException occurs
-
-
Method Details
-
getProtoString
- Overrides:
getProtoStringin classDriverWrapper
-
useLW
Description copied from class:DriverWrapperDo we have HexWKB as well known text representation - to be overridden by subclasses.- Overrides:
useLWin classDriverWrapper- Parameters:
result- Connection to check- Returns:
- true if using EWKB, false otherwise
-
getVersion
Returns our own CVS version plus postgres Version- Returns:
- String value reprenstation of the version
-