org.postgis
Class DriverWrapperLW

java.lang.Object
  extended by org.postgresql.Driver
      extended by org.postgis.DriverWrapper
          extended by org.postgis.DriverWrapperLW
All Implemented Interfaces:
java.sql.Driver

public class DriverWrapperLW
extends DriverWrapper

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 org.postgis.DriverWrapperLW as driver class.

Author:
Markus Schaber
See Also:
DriverWrapper

Nested Class Summary
 
Nested classes/interfaces inherited from class org.postgis.DriverWrapper
DriverWrapper.TypesAdder, DriverWrapper.TypesAdder72, DriverWrapper.TypesAdder74, DriverWrapper.TypesAdder80
 
Field Summary
static java.lang.String POSTGIS_LWPROTOCOL
           
static java.lang.String REVISIONLW
           
 
Fields inherited from class org.postgis.DriverWrapper
logger, POSTGIS_PROTOCOL, POSTGRES_PROTOCOL, REVISION, ta72, ta74, ta80, typesAdder
 
Fields inherited from class org.postgresql.Driver
DEBUG, INFO, MAJORVERSION, MINORVERSION
 
Constructor Summary
DriverWrapperLW()
          Default constructor.
 
Method Summary
protected  java.lang.String getProtoString()
           
static java.lang.String getVersion()
          Returns our own CVS version plus postgres Version
protected  boolean useLW(java.sql.Connection result)
          Do we have HexWKB as well known text representation - to be overridden by subclasses.
 
Methods inherited from class org.postgis.DriverWrapper
acceptsURL, addGISTypes, addGISTypes72, addGISTypes80, connect, getTypesAdder, mangleURL
 
Methods inherited from class org.postgresql.Driver
getLogLevel, getMajorVersion, getMinorVersion, getPropertyInfo, jdbcCompliant, makeSSL, notImplemented, setLogLevel, sslEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

POSTGIS_LWPROTOCOL

public static final java.lang.String POSTGIS_LWPROTOCOL
See Also:
Constant Field Values

REVISIONLW

public static final java.lang.String REVISIONLW
See Also:
Constant Field Values
Constructor Detail

DriverWrapperLW

public DriverWrapperLW()
                throws java.sql.SQLException
Default constructor.

Throws:
java.sql.SQLException
Method Detail

getProtoString

protected java.lang.String getProtoString()
Overrides:
getProtoString in class DriverWrapper

useLW

protected boolean useLW(java.sql.Connection result)
Description copied from class: DriverWrapper
Do we have HexWKB as well known text representation - to be overridden by subclasses.

Overrides:
useLW in class DriverWrapper

getVersion

public static java.lang.String getVersion()
Returns our own CVS version plus postgres Version