Examples of commitTrans()


Examples of org.gdbms.engine.data.AlphanumericDataSource.commitTrans()

            d.undo();          
        }
        d.redo();
        d.undo();
        int total = listener.total;
        d.commitTrans();
        assertTrue(listener.total == total);
    }
   
    public void testSelectionChange() throws Exception {
        DataSource d = ds.getDataSource("persona", DataSourceFactory.UNDOABLE);
View Full Code Here

Examples of org.gdbms.engine.data.AlphanumericDataSource.commitTrans()

    DataSourceFactory dsf = new DataSourceFactory();
    DriverUtilities.copy(new File("src/test/resources/puntos.backup.dbf"), new File("src/test/resources/puntos.dbf"));
    AlphanumericDataSource ads = dsf.getAlphanumericDataSource(new File("src/test/resources/puntos.dbf"));
    ads.beginTrans();
    ads.setDouble(0, 0, 3);
    ads.commitTrans();
    ads.start();
    assertTrue(ads.getDouble(0, 0) == 3);
    ads.stop();
  }
}
View Full Code Here

Examples of org.gdbms.engine.data.AlphanumericDataSource.commitTrans()

        ds.beginTrans();
        ds.deleteRow(2);
        ds.setFieldValue(0, 1, ValueFactory.createValue("nuevo"));
        String table = ds.getAsString();
        try {
            ds.commitTrans();
        } catch (DriverException e) {
            assertTrue(ds.getAsString().equals(table));
        }
        ds.rollBackTrans();
    }
View Full Code Here

Examples of org.gdbms.engine.data.AlphanumericDataSource.commitTrans()

        ds.beginTrans();
        ds.deleteRow(2);
        ds.setFieldValue(0, 1, ValueFactory.createValue("nuevo"));
        String table = ds.getAsString();
        try {
            ds.commitTrans();
        } catch (DriverException e) {
            assertTrue(ds.getAsString().equals(table));
        }
        ds.rollBackTrans();
    }
View Full Code Here

Examples of org.gdbms.engine.data.AlphanumericDataSource.commitTrans()

        ds.beginTrans();
        ds.deleteRow(2);
        ds.setFieldValue(0, 1, ValueFactory.createValue("nuevo"));
        String table = ds.getAsString();
        try {
            ds.commitTrans();
        } catch (FreeingResourcesException e) {
            assertTrue(true);
        } catch (DriverException e) {
            assertTrue(false);
            assertTrue(ds.getAsString().equals(table));
View Full Code Here

Examples of org.gdbms.engine.data.AlphanumericDataSource.commitTrans()

        ds.beginTrans();
        ds.deleteRow(2);
        ds.setFieldValue(0, 1, ValueFactory.createValue("nuevo"));
        String table = ds.getAsString();
        try {
            ds.commitTrans();
        } catch (FreeingResourcesException e) {
            assertTrue(true);
        } catch (DriverException e) {
            assertTrue(false);
            assertTrue(ds.getAsString().equals(table));
View Full Code Here

Examples of org.gdbms.engine.data.AlphanumericDataSource.commitTrans()

        ds.beginTrans();
        ds.deleteRow(2);
        ds.setFieldValue(0, 1, ValueFactory.createValue("nuevo"));
        String table = ds.getAsString();
        try {
            ds.commitTrans();
        } catch (DriverException e) {
            assertTrue(ds.getAsString().equals(table));
        }
        ds.rollBackTrans();
    }
View Full Code Here

Examples of org.gdbms.engine.data.AlphanumericDataSource.commitTrans()

        ds.beginTrans();
        ds.deleteRow(2);
        ds.setFieldValue(0, 1, ValueFactory.createValue("nuevo"));
        ds.getAsString();
        try {
            ds.commitTrans();
        } catch (FreeingResourcesException e) {
            assertTrue(true);
        } catch (DriverException e) {
            assertTrue(false);
        }
View Full Code Here

Examples of org.gdbms.engine.data.AlphanumericDataSource.commitTrans()

        d.setFieldValue(3, 0, ValueFactory.createValue(5));
        d.deleteRow(0); //0
        d.deleteRow(0); //1
        d.deleteRow(1); //3

        d.commitTrans();
       
        d = (AlphanumericDataSource) ds.getDataSource(dsName);
        d.start();
        assertTrue(((BooleanValue)d.getFieldValue(0, 0).equals(ValueFactory.createValue(2))).getValue());
        assertTrue(((BooleanValue)d.getFieldValue(0, 1).equals(ValueFactory.createValue("joder"))).getValue());
View Full Code Here

Examples of org.gdbms.engine.data.AlphanumericDataSource.commitTrans()

        d.beginTrans();
        d.setFieldValue(1, 1, ValueFactory.createValue("a"));
        d.deleteRow(0); //0
        d.setFieldValue(0, 1, ValueFactory.createValue("b"));

        d.commitTrans();
       
        d = (AlphanumericDataSource) ds.getDataSource(dsName);
        d.start();
        assertTrue(((BooleanValue)d.getFieldValue(0, 1).equals(ValueFactory.createValue("b"))).getValue());
        d.stop();
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.