Package org.apache.tuscany.das.rdb

Examples of org.apache.tuscany.das.rdb.ResultSetShape


        String sqlString = "Select 99, 'Roosevelt', '1600 Pennsylvania Avenue' from customer";
        String[] columns = { "ID", "LASTNAME", "ADDRESS" };
        String[] tables = { "CUSTOMER", "CUSTOMER", "CUSTOMER" };
        Type[] types = { SDODataTypes.LONG, SDODataTypes.STRING, SDODataTypes.STRING };

        ResultSetShape shape = new ResultSetShape(tables, columns, types);

        // Create and initialize command to read customers
        Command readCustomers = Command.FACTORY.createCommand(sqlString,
                getConfig("CustomerConfigWithIDConverter.xml"));
        // Specify result shape
View Full Code Here


    read.setConnection(getConnection());

    String[] columns = { "ID", "LASTNAME", "ADDRESS" };
    String[] tables = { "CUSTOMER", "CUSTOMER", "CUSTOMER" };
    Type[] types = { SDODataTypes.INTEGEROBJECT, SDODataTypes.DATE, SDODataTypes.STRING };
    ResultSetShape shape = new ResultSetShape(tables, columns, types);
    read.setResultSetShape(shape);
           
    //Read
    DataObject root = read.executeQuery();
   
View Full Code Here

        debug("Creating new ResultMetadata with mapping model " + model);
        this.resultSet = rs;
        this.mappingWrapper = new MappingWrapper(model);

        if (shape == null)
            this.resultSetShape = new ResultSetShape(rs.getMetaData());
        else
            this.resultSetShape = shape;

        this.converters = new Converter[resultSetShape.getColumnCount()];
View Full Code Here

  private static final String[] tables = {"CUSTOMER", "CUSTOMER", "CUSTOMER"};
  private static final Type[] types = {SDODataTypes.INT, SDODataTypes.STRING, SDODataTypes.STRING};

  public ReadCustomersWithShapeCommand() {
    super(sqlString);
    ResultSetShape shape = new ResultSetShape(tables, columns, types);
    setResultSetShape(shape);
  }
View Full Code Here

    mapping.getTable().add(t);
  }

  public SimpleReadCustomersWithShapeCommand() {
    super(sqlString, mapping);
    ResultSetShape shape = new ResultSetShape(tables, columns, types);
    setResultSetShape(shape);
  }
View Full Code Here

    select.setConnection(getConnection());

    String[] columns = {"ID", "NAME", "QUANTITY", "PARENT_ID", "ID", "NAME", "QUANTITY", "PARENT_ID", "ID", "NAME", "QUANTITY", "PARENT_ID"};
    String[] tables = {"PART", "PART", "PART", "PART", "PART", "PART", "PART", "PART", "PART", "PART", "PART", "PART"};
    Type[] types = {SDODataTypes.INTEGEROBJECT, SDODataTypes.STRING, SDODataTypes.INTEGEROBJECT, SDODataTypes.INTEGEROBJECT, SDODataTypes.INTEGEROBJECT, SDODataTypes.STRING, SDODataTypes.INTEGEROBJECT, SDODataTypes.INTEGEROBJECT, SDODataTypes.INTEGEROBJECT, SDODataTypes.STRING, SDODataTypes.INTEGEROBJECT, SDODataTypes.INTEGEROBJECT};
    ResultSetShape shape = new ResultSetShape(tables, columns, types);

    //Hack until we provide a nicer API
    ((ReadCommandImpl)select).setResultSetShape(shape)
   
    // Need to set the key explicitly. The aggregate of columns not working
View Full Code Here

TOP

Related Classes of org.apache.tuscany.das.rdb.ResultSetShape

Copyright © 2018 www.massapicom. 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.