org.geotools.data.oracle
Class OracleFeatureWriter

java.lang.Object
  extended byorg.geotools.data.jdbc.JDBCFeatureWriter
      extended byorg.geotools.data.jdbc.JDBCTextFeatureWriter
          extended byorg.geotools.data.oracle.OracleFeatureWriter
All Implemented Interfaces:
FeatureWriter

public class OracleFeatureWriter
extends JDBCTextFeatureWriter

Subclasses JDBCTextFeatureWriter to issue Oracle transactions directly as sql text statements. The super class takes care of all the nasty details, this just returns the encoded geometry. To get some speed increases Jody maintains that this class should not be used, that the updatable result sets of JDBCFeatureWriter will work better. But I couldn't get those to work at all, whereas this works great for me. We could also consider putting the option for this or jdbc in the factory for OracleDataStore. Should also consider using prepared statements for inserts, as they should work faster - this should probably be done in the superclass.

Version:
$Id: OracleFeatureWriter.java 17700 2006-01-22 23:30:39Z desruisseaux $
Author:
Chris Holmes, TOPP

Field Summary
 
Fields inherited from class org.geotools.data.jdbc.JDBCFeatureWriter
closed, current, fidAttributes, listenerManager, live, queryData, reader
 
Constructor Summary
OracleFeatureWriter(FeatureReader fReader, QueryData queryData)
           
 
Method Summary
protected  java.lang.String getGeometryInsertText(com.vividsolutions.jts.geom.Geometry geom, int srid)
          Turns a geometry into the textual version needed for the sql statement
 
Methods inherited from class org.geotools.data.jdbc.JDBCTextFeatureWriter
addQuotes, doInsert, doUpdate, encodeColumnName, encodeName, makeDeleteSql, makeInsertSql, makeUpdateSql, remove, useQueryDataForInsert
 
Methods inherited from class org.geotools.data.jdbc.JDBCFeatureWriter
close, getFeatureType, hasNext, next, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OracleFeatureWriter

public OracleFeatureWriter(FeatureReader fReader,
                           QueryData queryData)
                    throws java.io.IOException
Method Detail

getGeometryInsertText

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

Specified by:
getGeometryInsertText in class JDBCTextFeatureWriter
Parameters:
geom -
srid -
Returns:
Throws:
java.io.IOException


Copyright © GeoTools. All Rights Reserved.