public class JDBCUpdateFeatureWriter extends JDBCFeatureReader implements FeatureWriter<SimpleFeatureType,SimpleFeature>
JDBCFeatureReader.ResultSetFeaturebuilder, callback, columnNames, cx, dataStore, featureSource, featureType, geometryFactory, hints, LOGGER, md, next, offset, pkey, query, rs, screenMap, st, TRACE_ENABLED, tracer, tx| Constructor and Description |
|---|
JDBCUpdateFeatureWriter(PreparedStatement ps,
Connection cx,
JDBCFeatureSource featureSource,
Query query) |
JDBCUpdateFeatureWriter(String sql,
Connection cx,
JDBCFeatureSource featureSource,
Query query) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Release the underlying resources associated with this stream.
|
SimpleFeature |
next()
Reads the next Feature in the FeatureReader.
|
void |
remove()
Removes current Feature, must be called before hasNext.
|
void |
write()
Writes the current Feature, must be called before hasNext.
|
cleanup, ensureNext, ensureOpen, finalize, getFeatureType, getPrimaryKey, getQuery, hasNext, init, readNextFeature, setNextclone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFeatureType, hasNextpublic JDBCUpdateFeatureWriter(String sql, Connection cx, JDBCFeatureSource featureSource, Query query) throws SQLException, IOException
SQLExceptionIOExceptionpublic JDBCUpdateFeatureWriter(PreparedStatement ps, Connection cx, JDBCFeatureSource featureSource, Query query) throws SQLException, IOException
SQLExceptionIOExceptionpublic SimpleFeature next() throws IOException, IllegalArgumentException, NoSuchElementException
FeatureReadernext in interface FeatureReader<SimpleFeatureType,SimpleFeature>next in interface FeatureWriter<SimpleFeatureType,SimpleFeature>next in class JDBCFeatureReaderIOException - If an error occurs reading the Feature.NoSuchElementException - If there are no more Features in the Reader.IllegalArgumentExceptionpublic void remove()
throws IOException
FeatureWriterFeatureWriters will need to allow all FeatureSources of the same typeName to issue a
FeatureEvent event of type FeatureEvent.FEATURES_REMOVED when this method is
called.
If this FeatureWriter is opperating against a Transaction FEATURES_REMOVED events should only be sent to FeatureSources operating on the same Transaction. When Transaction commit() is called other FeatureSources will be informed of the modifications.
When the current Feature has been provided as new content, this method "cancels" the add opperation (and notification needed).
remove in interface FeatureWriter<SimpleFeatureType,SimpleFeature>IOException - DOCUMENT ME!public void write()
throws IOException
FeatureWriterFeautreWriters will need to allow FeatureSources of the same typeName to issue a FeatureEvent:
false.
true and the resulting Feature has indeed been modified.
If this FeatureWriter is opperating against a Transaction the FEATURES_MODIFIED or FEATURES_ADDED events should only be sent to FeatureSources opperating on the same Transaction. When Transaction commit() is called other FeatureSources will be informed of the modifications.
If you have not called write() when you call hasNext() or next(), no modification will occur().
write in interface FeatureWriter<SimpleFeatureType,SimpleFeature>IOExceptionpublic void close()
throws IOException
FeatureReaderclose in interface Closeableclose in interface AutoCloseableclose in interface FeatureReader<SimpleFeatureType,SimpleFeature>close in interface FeatureWriter<SimpleFeatureType,SimpleFeature>close in class JDBCFeatureReaderIOException - if an I/O error occursCopyright © 1996–2019 Geotools. All rights reserved.