Package org.apache.tuscany.das.rdb

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


            customer.set("address", customerProfile.getAddress());
            customer.set("email", customerProfile.getEmail());
            customer.set("loginID", customerProfile.getLoginID());
            customer.set("password", customerProfile.getPassword());

            das.applyChanges(root);
            return getCustomerProfile(customerProfile.getLoginID());

        } catch (Exception e) {
            if (e instanceof RemoteException) {
                throw (RemoteException) e;
View Full Code Here


        stockPurchase.set("quantity", new Integer(sp.getStock().getQuantity()));
        stockPurchase.set("purchasePrice", new Float(11.00));
        // String type = stockPurchase.getType().getProperty("purchaseDate").getType().toString();
        stockPurchase.setDate("purchaseDate", new Date());

        das.applyChanges(root);
    }

    public CustomerProfileData testgetCustomerByLoginIDThroughDASRead(final String logonID) throws Exception {
        InputStream mapping = createConfigStream();
        Connection conn = createConnection();
View Full Code Here

        cust.getList("orders").add(order);

        assertEquals(custOrderCount + 1, cust.getList("orders").size());

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

        // verify cust1 relationship updates
        select = das.createCommand("SELECT * FROM CUSTOMER LEFT JOIN ANORDER "
                + "ON CUSTOMER.ID = ANORDER.CUSTOMER_ID where CUSTOMER.ID = ?");

View Full Code Here

        newCust.set("LASTNAME", "Gerkin");

        // Now delete this new customer
        newCust.delete();

        das.applyChanges(root);

        // Verify
        root = read.executeQuery();
        assertEquals(numCustomers, root.getList("CUSTOMER").size());
View Full Code Here

            // department.getString("NAME"));
            department.setString("NAME", "Dept-" + random);
            random = random + 1;
        }

        das.applyChanges(root);
    }

    /**
     * Yin Chen reports ... "In the class Statement, method: public int
     * executeUpdate(Parameters parameters) - its tossing out RuntimeException
View Full Code Here

        DataObject customer = (DataObject) root.get("CUSTOMER[1]");

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

        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

            System.out.println("Modifying department: " + department.getString("NAME"));
            department.setString("NAME", "Dept-" + random);
            random = random + 1;
        }

        das.applyChanges(root);

    }

}
View Full Code Here

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

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

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

        cust4.set("ID", Integer.valueOf(100));
        cust4.set("ADDRESS", "5528 Wells Fargo Drive");
        cust4.set("LASTNAME", "Gerkin");

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

        // Verify deletes
        select = das.createCommand("Select * from CUSTOMER where ID = ?");
        select.setParameter(1, Integer.valueOf(cust2ID));
        root = select.executeQuery();
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.