org.geotools.data.db2
Class DB2FeatureWriter

Object
  extended by JDBCFeatureWriter
      extended by JDBCTextFeatureWriter
          extended by DB2FeatureWriter
All Implemented Interfaces:
FeatureWriter<SimpleFeatureType,SimpleFeature>

public class DB2FeatureWriter
extends JDBCTextFeatureWriter

DOCUMENT ME!

Author:
David Adler - IBM Corporation
Module:
modules/plugin/db2 (gt-db2.jar)

Field Summary
 
Fields inherited from class JDBCTextFeatureWriter
mapper
 
Fields inherited from class JDBCFeatureWriter
closed, current, fidAttributes, live, queryData, reader
 
Constructor Summary
DB2FeatureWriter(FeatureReader<SimpleFeatureType,SimpleFeature> reader, QueryData queryData, DB2SQLBuilder sqlBuilder)
          DOCUMENT ME!
 
Method Summary
protected  String getGeometryInsertText(Geometry geom, int srid)
          Turns a geometry into the textual version needed for the sql statement
protected  String makeDeleteSql(SimpleFeature feature)
          Generates the SQL delete statement
protected  String makeInsertSql(SimpleFeature feature)
          Generates the SQL UPDATE statement.
protected  String makeUpdateSql(SimpleFeature live, SimpleFeature current)
          Generates the SQL UPDATE statement
 
Methods inherited from class JDBCTextFeatureWriter
addQuotes, doInsert, doUpdate, getGeometryInsertText, makeSelectForUpdateSql, remove, useQueryDataForInsert
 
Methods inherited from class JDBCFeatureWriter
close, encodeColumnName, encodeName, getFeatureType, hasNext, next, write
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DB2FeatureWriter

public DB2FeatureWriter(FeatureReader<SimpleFeatureType,SimpleFeature> reader,
                        QueryData queryData,
                        DB2SQLBuilder sqlBuilder)
                 throws IOException
DOCUMENT ME!

Parameters:
reader -
queryData -
sqlBuilder - DOCUMENT ME!
Throws:
IOException
Method Detail

makeDeleteSql

protected String makeDeleteSql(SimpleFeature feature)
                        throws IOException
Generates the SQL delete statement

Overrides:
makeDeleteSql in class JDBCTextFeatureWriter
Parameters:
feature -
Returns:
DB2 DELETE statement
Throws:
IOException
UnsupportedOperationException

makeInsertSql

protected String makeInsertSql(SimpleFeature feature)
                        throws IOException
Generates the SQL UPDATE statement.

Overrides:
makeInsertSql in class JDBCTextFeatureWriter
Parameters:
feature - the feature to insert.
Returns:
DB2 INSERT statement
Throws:
IOException

makeUpdateSql

protected String makeUpdateSql(SimpleFeature live,
                               SimpleFeature current)
                        throws IOException
Generates the SQL UPDATE statement

Overrides:
makeUpdateSql in class JDBCTextFeatureWriter
Parameters:
feature -
Returns:
DB2 UPDATE statement
Throws:
IOException
UnsupportedOperationException

getGeometryInsertText

protected String getGeometryInsertText(Geometry geom,
                                       int srid)
                                throws IOException
Description copied from class: JDBCTextFeatureWriter
Turns a geometry into the textual version needed for the sql statement

Specified by:
getGeometryInsertText in class JDBCTextFeatureWriter
Throws:
IOException


Copyright © 1996-2010 Geotools. All Rights Reserved.