Package org.geotools.data

Examples of org.geotools.data.Transaction.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);
        String v2 = restricted.getVersion();
        t.commit();
       
        // clean up
        t.close();
        restricted.setTransaction(Transaction.AUTO_COMMIT);
View Full Code Here


                    transaction.putProperty(VersioningDataStore.MESSAGE, "Synchronizing with Unit '"
                            + unitName + "' on table '" + tableName + "': " + centralChangeCount
                            + " changes sent and " + unitChangeCount + " changes received");

                    // close up
                    transaction.commit();
                    LOGGER.log(Level.INFO, "Successfull synchronisation of table " + tableName
                            + " for unit " + unitName + "(" + centralChangeCount
                            + " changes sent to the Unit, " + unitChangeCount
                            + " change incoming from the Unit)");
                } catch (Exception e) {
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

      e.printStackTrace();
    }finally{
     
      if(transaction!=null){
 
        transaction.commit();
        transaction.close()
      }
     
      if(store!=null){
        store.dispose();
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

        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

    while (reader.hasNext()) {
      reader.next();
      c++;
    }
    reader.close();
    transaction2.commit();
    transaction2.close();
    assertEquals(3, c);

    transaction2 = new DefaultTransaction();
    query = new Query("geostuff",
View Full Code Here

    while (reader.hasNext()) {
      reader.next();
      c++;
    }
    reader.close();
    transaction2.commit();
    transaction2.close();
    assertEquals(2, c);
  }

}
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.