org.geotools.data.db2
Class DB2FeatureStore
Object
JDBCFeatureSource
JDBCFeatureStore
DB2FeatureStore
- All Implemented Interfaces:
- FeatureSource<SimpleFeatureType,SimpleFeature>, FeatureStore<SimpleFeatureType,SimpleFeature>
- Direct Known Subclasses:
- DB2FeatureLocking
public class DB2FeatureStore
- extends JDBCFeatureStore
DB2 FeatureStore implementation. Overrides functionality in
JDBCFeatureStore to provide more efficient or more appropriate DB2-specific
implementation.
- Author:
- David Adler - IBM Corporation
- Module:
modules/plugin/db2 (gt-db2.jar)
Methods inherited from class JDBCFeatureStore |
addFeatures, addFeatures, assertFids, assertFilter, fids, getInProcessLockingManager, getTransaction, modifyFeatures, modifyFeatures, modifyFeatures, removeFeatures, setFeatures, setTransaction |
Methods inherited from class JDBCFeatureSource |
addFeatureListener, close, close, close, getBounds, getConnection, getCount, getDataStore, getFeatures, getFeatures, getFeatures, getInfo, getJDBCDataStore, getName, getQueryCapabilities, getSchema, getSupportedHints, removeFeatureListener |
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface FeatureSource |
addFeatureListener, getBounds, getCount, getDataStore, getFeatures, getFeatures, getFeatures, getInfo, getName, getQueryCapabilities, getSchema, getSupportedHints, removeFeatureListener |
DB2FeatureStore
public DB2FeatureStore(DB2DataStore dataStore,
SimpleFeatureType featureType)
- Basic constructor for DB2FeatureStore
- Parameters:
dataStore
- featureType
-
getBounds
public ReferencedEnvelope getBounds(Query query)
throws IOException
- Gets the bounds of the feature using the specified query.
- Specified by:
getBounds
in interface FeatureSource<SimpleFeatureType,SimpleFeature>
- Overrides:
getBounds
in class JDBCFeatureSource
- Parameters:
query
- a query object.
- Returns:
- the envelope representing the bounds of the features.
- Throws:
IOException
- if there was an encoder problem.
DataSourceException
- if there was an error executing the query to
get the bounds.
closeAll
protected void closeAll(ResultSet rs,
Statement stmt,
Connection conn,
Transaction transaction,
SQLException e)
- Closes everything associated with a query, the ResultSet, Statement and
Connection.
- Parameters:
rs
- the ResultSetstmt
- the Statementconn
- the Connectiontransaction
- the Transactione
- the SQLException, if any, or null
count
public int count(Query query,
Transaction transaction)
throws IOException
- Direct SQL query number of rows in query.
Note this is a low level SQL statement and if it fails the provided
Transaction will be rolled back.
SQL: SELECT COUNT(*) as cnt FROM table WHERE filter
- Overrides:
count
in class JDBCFeatureSource
- Parameters:
query
- transaction
-
- Returns:
- Number of rows in query, or -1 if not optimizable.
- Throws:
IOException
- Usual on the basis of a filter error
Copyright © 1996-2010 Geotools. All Rights Reserved.