Package org.apache.tuscany.das.rdb

Examples of org.apache.tuscany.das.rdb.ApplyChangesCommand.execute()


    // Build apply changes command
    ApplyChangesCommand apply = Command.FACTORY.createApplyChangesCommand(getConfig("basicCustomerOrderMapping.xml"));
    apply.setConnection(getConnection());

    // Flush changes
    apply.execute(root);

    // verify cust1 relationship updates
    select = Command.FACTORY
        .createCommand(
            "SELECT * FROM CUSTOMER LEFT JOIN ANORDER ON CUSTOMER.ID = ANORDER.CUSTOMER_ID where CUSTOMER.ID = :ID",
View Full Code Here


        // verify pre-condition (id is not there until after flush)
        assertNull(company.get("ID"));

        // Flush changes
        apply.execute(root);

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

        // Verify the change
View Full Code Here

        // verify pre-condition (id is not there until after flush)
        assertNull(company.get("ID"));

        // Flush changes
        apply.execute(root);

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

        // Verify the change
View Full Code Here

        ApplyChangesCommand apply = Command.FACTORY
                .createApplyChangesCommand(getConfig("basicCompanyDepartmentMapping.xml"));
        apply.setConnection(getConnection());

        // Flush changes
        apply.execute(root);

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

        // Verify the change
View Full Code Here

        ApplyChangesCommand apply = Command.FACTORY
                .createApplyChangesCommand(getConfig("basicCompanyDepartmentMapping.xml"));
        apply.setConnection(getConnection());

        // Flush changes
        apply.execute(root);

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

        // Verify the change
View Full Code Here

        DataObject newDepartment = root.createDataObject("DEPARTMENT");
        newDepartment.setString("NAME", "Default Name");
        firstCustomer.getList("departments").add(newDepartment);

        ApplyChangesCommand apply = commandGroup.getApplyChangesCommand();
        apply.execute(root);

    }

    public final void deleteDepartmentsFromFirstCompany() {
View Full Code Here

            System.out.println("Deleting department named: " + department.getString("NAME"));
            department.delete();
        }

        ApplyChangesCommand apply = commandGroup.getApplyChangesCommand();
        apply.execute(root);

    }

    public final void changeFirstCompanysDepartmentNames() {
View Full Code Here

            System.out.println("Modifying department: " + department.getString("NAME"));
            department.setString("NAME", getRandomDepartmentName());
        }

        ApplyChangesCommand apply = commandGroup.getApplyChangesCommand();
        apply.execute(root);

    }
   
   
    public void releaseResources() {
View Full Code Here

        customer.setString("ADDRESS", "main street");

        ApplyChangesCommand apply = Command.FACTORY.createApplyChangesCommand();
        apply.setConnection(getConnection());
        apply.execute(root);

        root = readCustomers.executeQuery();

        // If partial update was not used, LASTNAME would not be 'modified'
        customer = root.getDataObject("CUSTOMER[1]");
View Full Code Here

        // Purposely do not set lastname to let it default to 'Garfugengheist'
        // newCust.set("LASTNAME", "Gerkin" );

        ApplyChangesCommand apply = Command.FACTORY.createApplyChangesCommand();
        apply.setConnection(getConnection());
        apply.execute(root);

        Command readNewCust = Command.FACTORY.createCommand("select * from CUSTOMER where ID = 100");
        readNewCust.setConnection(getConnection());
        root = readNewCust.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.