org.geotools.data.db2
Class DB2FeatureSource

java.lang.Object
  extended byorg.geotools.data.jdbc.JDBCFeatureSource
      extended byorg.geotools.data.db2.DB2FeatureSource
All Implemented Interfaces:
FeatureSource
Direct Known Subclasses:
DB2FeatureStore

public class DB2FeatureSource
extends JDBCFeatureSource

DB2 Feature Source implementation. Overrides functionality in JDBCFeatureSource to provide more efficient or more appropriate DB2-specific implementation.

Author:
David Adler - IBM Corporation

Field Summary
protected  DB2DataStore dataStore
           
protected  FeatureType featureType
           
 
Constructor Summary
DB2FeatureSource(DB2DataStore dataStore, FeatureType featureType)
          Constructs a feature source based on a DB2 data store for a specified feature type.
 
Method Summary
protected  void closeAll(java.sql.ResultSet rs, java.sql.Statement stmt, java.sql.Connection conn, Transaction transaction, java.sql.SQLException e)
          Closes everything associated with a query, the ResultSet, Statement and Connection.
 com.vividsolutions.jts.geom.Envelope getBounds(Query query)
          Gets the bounds of the feature using the specified query.
 
Methods inherited from class org.geotools.data.jdbc.JDBCFeatureSource
addFeatureListener, close, close, close, count, getBounds, getConnection, getCount, getDataStore, getFeatures, getFeatures, getFeatures, getJDBCDataStore, getSchema, getTransaction, removeFeatureListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dataStore

protected DB2DataStore dataStore

featureType

protected FeatureType featureType
Constructor Detail

DB2FeatureSource

public DB2FeatureSource(DB2DataStore dataStore,
                        FeatureType featureType)
Constructs a feature source based on a DB2 data store for a specified feature type.

Parameters:
dataStore -
featureType -
Method Detail

closeAll

protected void closeAll(java.sql.ResultSet rs,
                        java.sql.Statement stmt,
                        java.sql.Connection conn,
                        Transaction transaction,
                        java.sql.SQLException e)
Closes everything associated with a query, the ResultSet, Statement and Connection.

Parameters:
rs - the ResultSet
stmt - the Statement
conn - the Connection
transaction - the Transaction
e - the SQLException, if any, or null

getBounds

public com.vividsolutions.jts.geom.Envelope getBounds(Query query)
                                               throws java.io.IOException
Gets the bounds of the feature using the specified query.

Specified by:
getBounds in interface FeatureSource
Overrides:
getBounds in class JDBCFeatureSource
Parameters:
query - a query object.
Returns:
the envelope representing the bounds of the features.
Throws:
java.io.IOException - if there was an encoder problem.
DataSourceException - if there was an error executing the query to get the bounds.


Copyright © GeoTools. All Rights Reserved.