Package org.gdbms.engine.data

Examples of org.gdbms.engine.data.SpatialDataSource.beginTrans()


  }

  public void testEditedSpatialDataSourceFullExtentFile() throws Exception {
    SpatialDataSource d = (SpatialDataSource) ds.getDataSource("shppuntos",
        DataSourceFactory.UNDOABLE);
    d.beginTrans();
    testEditedSpatialDataSourceFullExtent(d);
    d.commitTrans();

    d.beginTrans();
    d.buildIndex();
View Full Code Here


        DataSourceFactory.UNDOABLE);
    d.beginTrans();
    testEditedSpatialDataSourceFullExtent(d);
    d.commitTrans();

    d.beginTrans();
    d.buildIndex();
    testEditedSpatialDataSourceFullExtent(d);
    d.commitTrans();
  }
View Full Code Here

  }

  public void testEditedSpatialDataSourceFullExtentObject() throws Exception {
    SpatialDataSource d = (SpatialDataSource) ds.getDataSource(
        "spatialobjectpersona", DataSourceFactory.UNDOABLE);
    d.beginTrans();
    testEditedSpatialDataSourceFullExtent(d);
    d.commitTrans();

    d.beginTrans();
    d.buildIndex();
View Full Code Here

        "spatialobjectpersona", DataSourceFactory.UNDOABLE);
    d.beginTrans();
    testEditedSpatialDataSourceFullExtent(d);
    d.commitTrans();

    d.beginTrans();
    d.buildIndex();
    testEditedSpatialDataSourceFullExtent(d);
    d.commitTrans();
  }
View Full Code Here

   
    private void doTest(boolean indexed) throws Exception {
        SpatialDataSource sds = (SpatialDataSource) ds.getDataSource(
                "shppoligonos", DataSourceFactory.UNDOABLE);

        sds.beginTrans();
        if (indexed) {
            sds.buildIndex();
        }
        GeneralPathX cgp = new GeneralPathX();
        cgp.moveTo(0, 0);
View Full Code Here

    for (int i = 0; i < bounds.length; i++) {
      bounds[i] = geometries[i].getBounds2D();
    }
    SpatialDataSource d = (SpatialDataSource) ds.getDataSource(dsName);

    d.beginTrans();
    d.buildIndex();
    int sfi = d.getSpatialFieldIndex();
    long rc = d.getRowCount();
    Value[] row = d.getRow(0);
View Full Code Here

    public void testSpatialFieldEdition() throws Exception {
        SpatialDataSource d = (SpatialDataSource) ds
                .getDataSource("spatialobjectpersona");

        d.beginTrans();
        int sfi = d.getSpatialFieldIndex();
        try {
            d.removeField(sfi);
            assertTrue(false);
        } catch (UnsupportedOperationException e) {
View Full Code Here

    dsdm.addField("field", "CHAR");
    dsdm.setPrimaryKey(new String[] { "field" });
    DBSourceCreation dbsc = new DBSourceCreation(source, dsdm);
    ds.createDataSource(dbsc);
    SpatialDataSource d = ds.getSpatialDataSource(source);
    d.beginTrans();
    assertTrue(d.getSpatialFieldIndex() == 1);
    d.insertEmptyRow();
    d.setFieldValue(0, 1, GeometryFactory.createPoint2D(0, 0));
    d.setFieldValue(0, 0, ValueFactory.createValue("a"));
    d.commitTrans();
View Full Code Here

     */
    dsdm.setPrimaryKey(new String[] { "f1" });
    DBSourceCreation dbsc = new DBSourceCreation(source, dsdm);
    ds.createDataSource(dbsc);
    SpatialDataSource d = ds.getSpatialDataSource(source);
    d.beginTrans();
    assertTrue(d.getSpatialFieldIndex() == 16);
    d.insertFilledRow(new Value[] { ValueFactory.createValue("a"), // CHAR
        ValueFactory.createValue("b"), // VARCHAR
        ValueFactory.createValue(123123L), // BIGINT
        ValueFactory.createValue(true), // BOOLEAN
View Full Code Here

    }

    public void testSpatialObjectfailedCommit() throws Exception {
        SpatialDataSource ds = (SpatialDataSource)
            dsf.getDataSource("spatialObject");
        ds.beginTrans();
        ds.buildIndex();
        ds.deleteRow(2);
        ds.setFieldValue(0, 1, ValueFactory.createValue("nuevo"));
        ds.insertFilledRow(new Value[]{
                GeometryFactory.createPoint2D(100, 100),
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.