org.geotools.gce.imagemosaic.jdbc
Class DBDialect

Object
  extended by DBDialect
Direct Known Subclasses:
DB2Dialect, MySqlDialect, OracleDialect, PostgisDialect, UniversalDialect

public abstract class DBDialect
extends Object

This class is the base class for the different sql dialects used in spatial extensions form different vendors

Since:
2.5
Author:
mcr
Module:
modules/plugin/imagemosaic-jdbc (gt-imagemosaic-jdbc.jar)

Field Summary
protected  Config config
           
protected  DataSource dataSource
           
 
Constructor Summary
DBDialect(Config config)
          Constructor
 
Method Summary
protected abstract  String getBLOBSQLType()
           
protected  Config getConfig()
           
protected  Connection getConnection()
           
protected abstract  String getCreateIndexStatement(String tn)
           
protected  String getCreateSpatialTableStatement(String tableName)
           
protected  String getCreateSpatialTableStatementJoined(String tableName)
           
protected  String getDoubleSQLType()
           
protected abstract  String getMultiPolygonSQLType()
           
protected  String getRegisterSpatialStatement(String tn, String srs)
           
protected  String getUnregisterSpatialStatement(String tn)
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dataSource

protected DataSource dataSource

config

protected Config config
Constructor Detail

DBDialect

public DBDialect(Config config)
Constructor

Parameters:
config -
Method Detail

getBLOBSQLType

protected abstract String getBLOBSQLType()
Returns:
the sql type name for a blob (Binary Large Object)

getMultiPolygonSQLType

protected abstract String getMultiPolygonSQLType()
Returns:
the sql type name for a Multipolygon

getConfig

protected Config getConfig()
Returns:
the config object for this dialect

getConnection

protected Connection getConnection()
                            throws Exception
Returns:
jdbc connection
Throws:
Exception

getUnregisterSpatialStatement

protected String getUnregisterSpatialStatement(String tn)
Parameters:
tn - sql table name
Returns:
sql unregister spatial column statement for nt

getRegisterSpatialStatement

protected String getRegisterSpatialStatement(String tn,
                                             String srs)
Parameters:
tn - sql table name
srs - name of spatial reference system to use
Returns:
sql unregister spatial column statement for nt

getCreateIndexStatement

protected abstract String getCreateIndexStatement(String tn)
                                           throws Exception
Parameters:
tn - sql table name
Returns:
sql create spatial index statement for tn
Throws:
Exception

getDoubleSQLType

protected String getDoubleSQLType()
Returns:
sql datatype for 8 byte floating point

getCreateSpatialTableStatement

protected String getCreateSpatialTableStatement(String tableName)
                                         throws Exception
Parameters:
tableName -
Returns:
the sql create table statement for a spatial table
Throws:
Exception

getCreateSpatialTableStatementJoined

protected String getCreateSpatialTableStatementJoined(String tableName)
                                               throws Exception
Parameters:
tableName -
Returns:
the sql create table statement for a combined spatial/tile table named tableName
Throws:
Exception


Copyright © 1996-2009 Geotools. All Rights Reserved.