Package org.geotools.data

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


                .featureId("restricted.be7cafea-d0b7-4257-9b9c-1ed3de3f7ef4")));
        Transaction t = new DefaultTransaction();
        restricted.setTransaction(t);
        restricted.modifyFeatures(schema.getDescriptor("cat"), -48, updateFilter);
        String v1 = restricted.getVersion();
        t.commit();
       
        // second update
        WKTReader wkt = new WKTReader();
        Geometry g = wkt.read("MULTIPOLYGON(((0 0, 0 10, 10 10, 10 0, 0 0)))");
        restricted.modifyFeatures(schema.getDescriptor("the_geom"), g, updateFilter);
View Full Code Here


        // second update
        WKTReader wkt = new WKTReader();
        Geometry g = wkt.read("MULTIPOLYGON(((0 0, 0 10, 10 10, 10 0, 0 0)))");
        restricted.modifyFeatures(schema.getDescriptor("the_geom"), g, updateFilter);
        String v2 = restricted.getVersion();
        t.commit();
       
        // clean up
        t.close();
        restricted.setTransaction(Transaction.AUTO_COMMIT);
View Full Code Here

                        try {
                            t.addAuthorization(response.getLockId());
                            DataStore dataStore = (DataStore) source.getDataStore();
                            dataStore.getLockingManager().refresh(response.getLockId(), t);
                        } finally {
                            t.commit();
                        }
                    } catch (IOException e) {
                        throw new WFSException(e);
                    } finally {
                        try {
View Full Code Here

                fb.set(mapping.get(sname), source.getAttribute(sname));
            }
            SimpleFeature target = fb.buildFeature(null);
            fstore.addFeatures(DataUtilities.collection(target));
        }
        t.commit();
        t.close();

        return targetType;
    }
View Full Code Here

        factory.createPoint(new Coordinate(
            43.454,
            28.242)));
    writer.write();
    writer.close();
    transaction1.commit();
    transaction1.close();
  }

}
View Full Code Here

        newFeature.getAttribute("pid"),
        priorFeature.getAttribute("pid"));
    assertFalse(reader.hasNext());
    reader.close();

    transaction1.commit();
    transaction1.close();

  }
}
View Full Code Here

        t1,
        "f1");
    memoryLockManager.lock(
        t1,
        "f1");
    t1.commit();
    t1.close();
  }

  @Test
  public void testLockWithProperAuth()
View Full Code Here

        t1,
        lock);
    memoryLockManager.lock(
        t2,
        "f1");
    t2.commit();
    // commit should not take away the lock
    assertTrue(memoryLockManager.exists("auth1"));
    memoryLockManager.release(
        "auth1",
        t1);
View Full Code Here

        t2,
        "f1");
    assertTrue((System.currentTimeMillis() - currentTime) >= 4000);

    commiter.join();
    t2.commit();
    t2.close();
    t1.close();

  }
}
View Full Code Here

        DateUtilities.parseISO("2005-05-17T20:32:56Z"));
    newFeature.setAttribute("geometry",
        factory.createPoint(new Coordinate(43.454, 28.232)));
    writer.write();
    writer.close();
    transaction1.commit();
    transaction1.close();
  }

  @Test
  public void testGeo() throws CQLException, IOException, ParseException {
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.