Package org.gdbms.engine.data

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


    private DataSourceFactory dsf;

    public void testAlphanumericObjectfailedCommit() throws Exception {
        AlphanumericDataSource ds = (AlphanumericDataSource)
            dsf.getDataSource("alphaObject");
        ds.beginTrans();
        ds.deleteRow(2);
        ds.setFieldValue(0, 1, ValueFactory.createValue("nuevo"));
        String table = ds.getAsString();
        try {
            ds.commitTrans();
View Full Code Here


    }

    public void testAlphanumericFileFailOnWrite() throws Exception {
        AlphanumericDataSource ds = (AlphanumericDataSource)
            dsf.getDataSource("alphaWriteFile");
        ds.beginTrans();
        ds.deleteRow(2);
        ds.setFieldValue(0, 1, ValueFactory.createValue("nuevo"));
        String table = ds.getAsString();
        try {
            ds.commitTrans();
View Full Code Here

    }

    public void testAlphanumericFileFailOnClose() throws Exception {
        AlphanumericDataSource ds = (AlphanumericDataSource)
            dsf.getDataSource("alphaCloseFile");
        ds.beginTrans();
        ds.deleteRow(2);
        ds.setFieldValue(0, 1, ValueFactory.createValue("nuevo"));
        String table = ds.getAsString();
        try {
            ds.commitTrans();
View Full Code Here

    }

    public void testAlphanumericFileFailOnCopy() throws Exception {
        AlphanumericDataSource ds = (AlphanumericDataSource)
            dsf.getDataSource("alphaCopyFile");
        ds.beginTrans();
        ds.deleteRow(2);
        ds.setFieldValue(0, 1, ValueFactory.createValue("nuevo"));
        String table = ds.getAsString();
        try {
            ds.commitTrans();
View Full Code Here

    }

    public void testAlphanumericDBFailOnWrite() throws Exception {
        AlphanumericDataSource ds = (AlphanumericDataSource)
            dsf.getDataSource("alphaExecuteDB");
        ds.beginTrans();
        ds.deleteRow(2);
        ds.setFieldValue(0, 1, ValueFactory.createValue("nuevo"));
        String table = ds.getAsString();
        try {
            ds.commitTrans();
View Full Code Here

    }

    public void testAlphanumericDBFailOnClose() throws Exception {
        AlphanumericDataSource ds = (AlphanumericDataSource)
            dsf.getDataSource("alphaCloseDB");
        ds.beginTrans();
        ds.deleteRow(2);
        ds.setFieldValue(0, 1, ValueFactory.createValue("nuevo"));
        ds.getAsString();
        try {
            ds.commitTrans();
View Full Code Here

     * @throws Exception DOCUMENT ME!
     */
    private void testSetDeletedRow(String dsName) throws Exception {
        AlphanumericDataSource d = (AlphanumericDataSource) ds.getDataSource(dsName);

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

        d.commitTrans();
View Full Code Here

     * @throws Exception DOCUMENT ME!
     */
    private void testSetAfterDeletedPreviousRow(String dsName) throws Exception {
        AlphanumericDataSource d = (AlphanumericDataSource) ds.getDataSource(dsName);

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

        d.commitTrans();
       
View Full Code Here

    }
   
    private void testDeleteUpdatedPK(String dsName) throws Exception {
        AlphanumericDataSource d = (AlphanumericDataSource) ds.getDataSource(dsName);
       
        d.beginTrans();
        long rc = d.getRowCount();
        d.setFieldValue(0, 0, ValueFactory.createNullValue());
        d.deleteRow(0);
        d.commitTrans();
        d.start();
View Full Code Here

        Value v4 = ValueFactory.createValue(Date.valueOf("1998-09-05"));
        Value v5 = ValueFactory.createValue(Time.valueOf("4:30:01"));
        Value v6 = ValueFactory.createValue(Timestamp.valueOf("2005-09-05 4:30:01.666666666"));
       
        d.beginTrans();
        d.insertFilledRowAt(2, new Value[] {v1, v2, v3, v4, v5, v6});
        assertTrue(((BooleanValue) d.getFieldValue(0, 0).equals(ValueFactory.createValue(0))).getValue());
        assertTrue(((BooleanValue) d.getFieldValue(1, 0).equals(ValueFactory.createValue(1))).getValue());
        assertTrue(((BooleanValue) d.getFieldValue(2, 0).equals(ValueFactory.createValue(4))).getValue());
        assertTrue(((BooleanValue) d.getFieldValue(3, 0).equals(ValueFactory.createValue(2))).getValue());
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.