org.geotools.data.jdbc
Class JDBCDataStore
java.lang.Object
org.geotools.data.jdbc.JDBC1DataStore
org.geotools.data.jdbc.JDBC2DataStore
org.geotools.data.jdbc.JDBCDataStore
- All Implemented Interfaces:
- DataAccess<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature>, DataStore
- Direct Known Subclasses:
- MySQLDataStore, OracleDataStore, PostgisDataStore
Deprecated. scheduled for removal in 2.7, use classes in org.geotools.jdbc
public abstract class JDBCDataStore
- extends JDBC2DataStore
Abstract class for JDBC (level2) based DataStore implementations.
This a convenience class that just extends JDBC2DataStore to keep
current datastores that use it happy.
Eventually datastores should extend one of JDBC1DataStore, or
JDBC2DataStore.
This class provides a default implementation of a JDBC data store. Support
for vendor specific JDBC data stores can be easily added to Geotools by
subclassing this class and overriding the hooks provided.
At a minimum subclasses should implement the following methods:
-
buildAttributeType(ResultSet)
- This
should be overriden to construct an attribute type that represents any
column types not supported by the default implementation, such as geometry
columns.
-
getGeometryAttributeIO(AttributeType, QueryData)
- Should be overriden to
provide a way to read/write geometries into the format of the database
Additionally subclasses can optionally override the following:
-
Use a specific FIDMapperFactory by overriding the
buildFIDMapperFactory(JDBCDataStoreConfig)
method, and eventually disallow
user overrides by throwing an UnsupportedOperationException
in
the setFidMapperFactory()
method.
-
allowTable
- Used to determine whether a table
name should be exposed as a feature type.
-
determineSRID
- Used to determine the
SpatialReference ID of a geometry column in a table.
-
buildSQLQuery()
- Sub classes can override this to build a custom SQL
query.
-
getResultSetType
if the standard result
set type is not satisfactory/does not work with a normal FORWARD_ONLY
resultset type
-
getConcurrency
to set the level of
concurrency for the result set used to read/write the database
Additionally subclasses may want to set the value of:
-
sqlNameEscape - character (String) to surround names of SQL objects to
support mixed-case and non-English names.
- Version:
- $Id: JDBCDataStore.java 33484 2009-07-06 02:17:34Z jdeolive $
- Author:
- Amr Alam, Refractions Research, Sean Geoghegan, Defence Science and Technology Organisation, Chris Holmes, TOPP, Andrea Aime
Methods inherited from class org.geotools.data.jdbc.JDBC1DataStore |
allowTable, allSameOrder, attributeNames, buildAttributeType, buildFIDMapper, buildFIDMapperFactory, buildSchema, createFeatureReader, createFeatureWriter, createLockingManager, createSchema, determineFidColumnName, determineSRID, executeQuery, executeQuery, getAttributeIO, getAttributeTypes, getConcurrency, getConnection, getDatabaseSchemaName, getEnvelope, getFeatureReader, getFeatureReader, getFeatureSource, getFeatureSource, getFeatureTypeHandler, getFeatureWriter, getFeatureWriter, getFeatureWriterAppend, getFIDMapper, getFIDMapperFactory, getGeometryAttributeIO, getInfo, getJDBCFeatureReader, getLockingManager, getNames, getNameSpace, getResultSetType, getSchema, getSchema, getSqlBuilder, getSqlNameEscape, getSupportedHints, getTransactionIsolation, getTypeNames, getView, propertyNames, requireAutoCommit, setAutoCommit, setFIDMapper, setFIDMapperFactory, setSqlNameEscape, setTransactionIsolation, updateSchema, updateSchema |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JDBCDataStore
protected JDBCDataStore(javax.sql.DataSource dataSource,
JDBCDataStoreConfig config)
throws java.io.IOException
- Deprecated.
- Throws:
java.io.IOException
Copyright © 1996-2010 Geotools. All Rights Reserved.