Package org.apache.tuscany.das.rdb

Examples of org.apache.tuscany.das.rdb.DAS.applyChanges()


        DataObject root = getOrderDetails.executeQuery();

        DataObject orderDetail = (DataObject) root.get("ORDERDETAILS[1]");
        orderDetail.delete();
        das.applyChanges(root);

    }
}
View Full Code Here


        DataObject newCustomer = root.createDataObject("CUSTOMER");
        newCustomer.set("LASTNAME", "NewCustomer");
        newCustomer.setInt("ID", 9000);

        // Build apply changes command
        das.applyChanges(root);

        // Verify the change
        root = select.executeQuery();
        assertEquals("Pavick", getCustomerByLastName(root, "Pavick").getString("LASTNAME"));
        assertEquals("NewCustomer", getCustomerByLastName(root, "NewCustomer").getString("LASTNAME"));
View Full Code Here

        // Flush changes -- This should fail because Order Details does not have
        // a column that
        // we can assume to be an ID
        try {
            das.applyChanges(root);
        } catch (RuntimeException ex) {
            assertTrue(ex.getMessage().indexOf("changed in the DataGraph but is not present in the Config") >= 0);
        }

    }
View Full Code Here

        // Flush changes -- This should fail because Order Details does not have
        // a column that
        // we can assume to be an ID
        try {
            das.applyChanges(root);
        } catch (RuntimeException ex) {
            assertTrue(ex.getMessage().indexOf("changed in the DataGraph but is not present in the Config") >= 0);
        }

    }
View Full Code Here

        // Flush changes -- This should fail because Order Details does not have
        // a column that
        // we can assume to be an ID
        try {
            das.applyChanges(root);
        } catch (RuntimeException ex) {
            assertTrue(ex.getMessage().indexOf("changed in the DataGraph but is not present in the Config") >= 0);
        }

    }
View Full Code Here

        int deptCount = firstCustomer.getList("departments").size();

        DataObject newDepartment = root.createDataObject("DEPARTMENT");
        firstCustomer.getList("departments").add(newDepartment);

        das.applyChanges(root);

        //verify
        root = read.executeQuery();
        firstCustomer = root.getDataObject("COMPANY[1]");
        assertEquals(deptCount + 1, firstCustomer.getList("departments").size());
View Full Code Here

        // Associate the new department with the new company
        company.getList("departments").add(department);

        // Get apply command
        das.applyChanges(root);

        // Save the id
        Integer id = (Integer) company.get("ID");

        // Verify the change
View Full Code Here

        DataObject newCustomer = root.createDataObject("CUSTOMER");
        newCustomer.setInt("ID", 9999);
        newCustomer.setString("LASTNAME", "Jones");

        // Build apply changes command
        das.applyChanges(root);

        // Verify changes
        root = select.executeQuery();
        boolean found = false;
        Iterator i = root.getList("CUSTOMER").iterator();
View Full Code Here

        // Modify customer
        customer.set("LASTNAME", "Pavick");

        // Build apply changes command
        das.applyChanges(root);

        // Verify changes
        root = select.executeQuery();
        assertEquals("Pavick", root.getString("CUSTOMER[1]/LASTNAME"));
View Full Code Here

        // Modify customer
        customer.set("LASTNAME", "Pavick");

        // Build apply changes command
        das.applyChanges(root);

        // Verify changes
        root = select.executeQuery();
        assertEquals("Pavick", root.getString("CUSTOMER[1]/LASTNAME"));
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.