Hi Justin:

I have added event notification methods to ContentDataStore; and am
having a bit of fun hooking up things in jdbc-ng for testing...
consider the following JDBCInsertFeatureWriter method as an example:

    public void write() throws IOException {
        try {
            //do the insert
            dataStore.insert(last, featureType, st.getConnection());

            //the datastore sets as userData, grab it and update the fid
            String fid = (String) last.getUserData().get( "fid" );
            last.setID( fid );

            ContentEntry entry = featureSource.getEntry();
            ContentState state = entry.getState( this.tx );
            state.fireFeatureAdded( featureSource, last );
        } catch (SQLException e) {
            throw (IOException) new IOException().initCause(e);
        }
    }

I expected to have access to the ContentState directly when working;
but JDBCInsertFeatureWriter  made me take a long walk to get it ...and
then even that did not work as  this.featureSource is null.

I am calling it a night; I can commit the changes to the
ContentDataStore classes and send you the patch for jdbc-ng. I have
only hooked up the basics (add,modify,remove) and gotten batched
feature events populated; I still need to find out where the
commit/rollback code is and make sure they actually issue the batch
feature event notification.

Jody

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to