Examples of DefaultTransaction


Examples of org.geotools.data.DefaultTransaction

    @Test
    public void testFeatureWriter_RowIDSDE_Transaction() throws IOException,
            UnavailableConnectionException {
        final String tableName = seRowidSdeTable;
        final Transaction transaction = new DefaultTransaction();
        try {
            FeatureWriter<SimpleFeatureType, SimpleFeature> writer;

            writer = addFeatures(tableName, transaction);
            /*
             * This one works regardless of the database being MSSQL or not because the table IS
             * being created as versioned by testData.createTestTable.
             * <http://support.esri.com/index.cfm?fa=knowledgebase.techarticles.articleShow&d=32190>
             */
            assertEquals(0, ds.getFeatureSource(tableName).getCount(Query.ALL));
            transaction.commit();
            writer.close();
            assertEquals(2, ds.getFeatureSource(tableName).getCount(Query.ALL));
        } finally {
            transaction.close();
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.