Class JDBCUpdateFeatureWriter

    • Constructor Detail

      • JDBCUpdateFeatureWriter

        public JDBCUpdateFeatureWriter​(String sql,
                                       Connection cx,
                                       JDBCFeatureSource featureSource,
                                       Query query)
                                throws SQLException,
                                       IOException
        Throws:
        SQLException
        IOException
      • JDBCUpdateFeatureWriter

        public JDBCUpdateFeatureWriter​(PreparedStatement ps,
                                       Connection cx,
                                       JDBCFeatureSource featureSource,
                                       Query query)
                                throws SQLException,
                                       IOException
        Throws:
        SQLException
        IOException
    • Method Detail

      • remove

        public void remove()
                    throws IOException
        Description copied from interface: FeatureWriter
        Removes current Feature, must be called before hasNext.

        FeatureWriters 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).

        Specified by:
        remove in interface FeatureWriter<SimpleFeatureType,​SimpleFeature>
        Throws:
        IOException
      • write

        public void write()
                   throws IOException
        Description copied from interface: FeatureWriter
        Writes the current Feature, must be called before hasNext.

        FeautreWriters will need to allow FeatureSources of the same typeName to issue a FeatureEvent:

        • FeatureEvent.FEATURES_ADDED: when next() has been called with hasNext() equal to false.
        • FeatureEvent.FEATURES_MODIFIED: when next has been called with hasNext() equal to 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().

        Specified by:
        write in interface FeatureWriter<SimpleFeatureType,​SimpleFeature>
        Throws:
        IOException