Package org.apache.tuscany.das.rdb

Examples of org.apache.tuscany.das.rdb.Command.addParameter()


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

        //Manually create and add update command
        Command update = Command.FACTORY.createCommand( "update CUSTOMER set LASTNAME = :LASTNAME where ID = :ID" );
        update.addParameter( "LASTNAME", SDODataTypes.STRING );
        update.addParameter( "ID", SDODataTypes.INTEGER );
        apply.addUpdateCommand( customer.getType(), update );

        //Flush changes
        apply.execute( root );
View Full Code Here


        apply.setConnection( getConnection() );

        //Manually create and add update command
        Command update = Command.FACTORY.createCommand( "update CUSTOMER set LASTNAME = :LASTNAME where ID = :ID" );
        update.addParameter( "LASTNAME", SDODataTypes.STRING );
        update.addParameter( "ID", SDODataTypes.INTEGER );
        apply.addUpdateCommand( customer.getType(), update );

        //Flush changes
        apply.execute( root );
View Full Code Here

  public void testGetNamedCustomers() throws Exception {

    Command read = Command.FACTORY.createCommand("{call GETNAMEDCUSTOMERS(?,?)}");
    read.setConnection(getConnection());
    read.setParameterValue(1, "Williams");
    read.addParameter(2, Parameter.OUT, SDODataTypes.INTEGER);
    DataObject root = read.executeQuery();   
   
    Integer customersRead = (Integer) read.getParameterValue(2);

    assertEquals(4, customersRead.intValue());
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.