Package org.geotools.data

Examples of org.geotools.data.DefaultTransaction.rollback()


            tx.commit();

            // #of features after commit on a different store instance
            assertEquals(2, dataStore.getFeatureSource(pointsTypeName).getFeatures().size());
        } catch (Exception e) {
            tx.rollback();
            throw e;
        } finally {
            tx.close();
        }
        points.setTransaction(Transaction.AUTO_COMMIT);
View Full Code Here


            tx.putProperty(GeogigTransactionState.VERSIONING_COMMIT_AUTHOR, "John Doe");
            tx.putProperty(GeogigTransactionState.VERSIONING_COMMIT_MESSAGE, "test message");
            tx.commit();
            assertEquals(3, dataStore.getFeatureSource(pointsTypeName).getFeatures().size());
        } catch (Exception e) {
            tx.rollback();
            throw e;
        } finally {
            tx.close();
        }
View Full Code Here

            tx.putProperty("fullname", "John Doe");
            tx.putProperty("email", "jd@example.com");
            tx.commit();
            assertEquals(3, dataStore.getFeatureSource(pointsTypeName).getFeatures().size());
        } catch (Exception e) {
            tx.rollback();
            throw e;
        } finally {
            tx.close();
        }
View Full Code Here

                        newFeature.setAttribute(localName, addFeature.getAttribute(localName));
                    }
                    writer.write();
                }
            } catch (Exception e) {
                transaction.rollback();
                transaction.close();
            } finally {
                writer.close();
            }
View Full Code Here

            }

            try {
                transaction.commit();
            } catch (Exception e) {
                transaction.rollback();
                throw e;
            }
        } finally {
            transaction.close();
        }
View Full Code Here

            SimpleFeatureCollection features;
            features = fStore.getFeatures(newFidsFilter);
            assertEquals(2, features.size());
            transaction.commit();
        } catch (Exception e) {
            transaction.rollback();
            throw e;
        } finally {
            transaction.close();
        }
    }
View Full Code Here

            }

            try {
                transaction.commit();
            } catch (IOException e) {
                transaction.rollback();
                throw e;
            }
        } finally {
            transaction.close();
        }
View Full Code Here

                final AttributeDescriptor propDescriptor = schema.getDescriptor("INT32_COL");
                store.modifyFeatures(propDescriptor.getName(), Integer.valueOf(-1000),
                        oldValueFilter);
                transaction.commit();
            } catch (Exception e) {
                transaction.rollback();
            } finally {
                transaction.close();
            }
        }
        store.setTransaction(Transaction.AUTO_COMMIT);
View Full Code Here

        try {
            store.modifyFeatures(defaultGeometry.getName(), modif2, fid2Filter);
            store.modifyFeatures(defaultGeometry.getName(), modif1, fid1Filter);
            transaction.commit();
        } catch (Exception e) {
            transaction.rollback();
            throw e;
        } finally {
            transaction.close();
        }
        store.setTransaction(Transaction.AUTO_COMMIT);
View Full Code Here

                dest.setAttributes(source.getAttributes());
                writer.write();
            }
            transaction.commit();
        } catch (Exception e) {
            transaction.rollback();
            throw e;
        } finally {
            writer.close();
            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.