org.geotools.data.mysql
Class MySQLFeatureWriter

java.lang.Object
  extended by org.geotools.data.jdbc.JDBCFeatureWriter
      extended by org.geotools.data.jdbc.JDBCTextFeatureWriter
          extended by org.geotools.data.mysql.MySQLFeatureWriter
All Implemented Interfaces:
FeatureWriter<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature>

public class MySQLFeatureWriter
extends JDBCTextFeatureWriter

Feature writer handling specific geometric function from MySQL 4.1 TODO This ought to handle MySQL 4.1's geometric datatypes, but it does not work. This is because 4.1 sends geometric data in a different packet format than other datatypes, and because of this the MySQL driver does not allow ResultSet objects with geometric data to be updatable. I have not found anything about this MySQL bug in the MySQL bug database, so I will add a new bug there. In the meantime, this package should work fine for writing non-geometric data.

Author:
Gary Sheppard garysheppard@psu.edu, wolf, Gary Sheppard garysheppard@psu.edu

Field Summary
 
Fields inherited from class org.geotools.data.jdbc.JDBCTextFeatureWriter
mapper
 
Fields inherited from class org.geotools.data.jdbc.JDBCFeatureWriter
closed, current, fidAttributes, live, queryData, reader
 
Constructor Summary
MySQLFeatureWriter(FeatureReader<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> 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, getGeometryInsertText, makeDeleteSql, makeInsertSql, makeSelectForUpdateSql, makeUpdateSql, remove, useQueryDataForInsert
 
Methods inherited from class org.geotools.data.jdbc.JDBCFeatureWriter
close, encodeColumnName, encodeName, getFeatureType, hasNext, next, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MySQLFeatureWriter

public MySQLFeatureWriter(FeatureReader<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> fReader,
                          QueryData queryData)
                   throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getGeometryInsertText

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

Specified by:
getGeometryInsertText in class JDBCTextFeatureWriter
See Also:
JDBCTextFeatureWriter.getGeometryInsertText(com.vividsolutions.jts.geom.Geometry, int)


Copyright © 1996-2010 Geotools. All Rights Reserved.