Package com.scooterframework.orm.sqldataexpress.object

Examples of com.scooterframework.orm.sqldataexpress.object.Cursor


                Parameter.MODE_OUT.equals(p.getMode()) ||
                Parameter.MODE_RETURN.equals(p.getMode())) { //function return
                if ( p.isCursorType() ) {
                    ResultSet rs = (ResultSet)cstmt.getObject(p.getIndex());
                   
                    Cursor cursor = sp.getCursor(p.getName(), rs);
                    int cursorWidth = cursor.getDimension();
                   
                    TableData rt = new TableData();
                    rt.setHeader(cursor);
                    returnTO.addTableData(p.getName(), rt);
                   
                    while(rs.next()) {
                        Object[] cellValues = new Object[cursorWidth];
                        for ( int i = 0; i < cursorWidth; i++ ) {
                            cellValues[i] = dba.getObjectFromResultSetByType(rs,
                                                                         cursor.getColumnJavaClassName(i),
                                                                         cursor.getColumnSqlDataType(i),
                                                                         i+1);
                        }
                        rt.addRow(new RowData(cursor, cellValues));
                    }
                    rs.close();
View Full Code Here


                Parameter.MODE_OUT.equals(p.getMode()) ||
                Parameter.MODE_RETURN.equals(p.getMode())) { //function return
                if (p.isCursorType()) {
                    ResultSet rs = (ResultSet)cstmt.getObject(p.getIndex());
                   
                    Cursor cursor = sp.getCursor(p.getName(), rs);
                    int cursorWidth = cursor.getDimension();
                   
                    Set<String> allowedColumns = getAllowedColumns(outputFilter, cursor);
                    TableData rt = new TableData();
                    RowInfo newHeader = getFilteredHeaderInfo(allowedColumns, cursor);
                    rt.setHeader(newHeader);
                    returnTO.addTableData(p.getName(), rt);
                   
                    while(rs.next()) {
                        ArrayList<Object> cellValues = new ArrayList<Object>();
                        for (int i = 0; i < cursorWidth; i++) {
                            if (outputFilter.containsKey(cursor.getColumnName(i))) {
                                cellValues.add(dba.getObjectFromResultSetByType(rs,
                                                                            cursor.getColumnJavaClassName(i),
                                                                            cursor.getColumnSqlDataType(i),
                                                                            i+1));
                            }
                        }
                       
                        if (cellValues.size() > 0)
View Full Code Here

    }

  private void handleResultSet(JdbcStatement jstat, DBAdapter dba,
      String stName, OmniDTO returnTO, ResultSet rs, Map<String, ?> inputs)
    throws SQLException {
        Cursor cursor = jstat.getCursor(stName, rs);
        int cursorWidth = cursor.getDimension();
       
        TableData rt = new TableData();
        rt.setHeader(cursor);
        returnTO.addTableData(stName, rt);
       
        while(rs.next()) {
            Object[] cellValues = new Object[cursorWidth];
            for (int i = 0; i < cursorWidth; i++) {
        cellValues[i] = dba.getObjectFromResultSetByType(rs,
            cursor.getColumnJavaClassName(i),
            cursor.getColumnSqlDataType(i), i + 1);
            }
            rt.addRow(new RowData(cursor, cellValues));
        }
        rs.close();
    }
View Full Code Here

   
  private void handleFilteredResultSet(JdbcStatement jstat, DBAdapter dba,
      String stName, OmniDTO returnTO, ResultSet rs,
      Map<String, Object> inputs, Map<String, String> outputs)
    throws SQLException {
        Cursor cursor = jstat.getCursor(stName, rs);
        int cursorWidth = cursor.getDimension();
       
        Set<String> allowedColumns = getAllowedColumns(outputs, cursor);
        TableData rt = new TableData();
        RowInfo newHeader = getFilteredHeaderInfo(allowedColumns, cursor);
        rt.setHeader(newHeader);
        returnTO.addTableData(stName, rt);
       
        while(rs.next()) {
            ArrayList<Object> cellValues = new ArrayList<Object>();
            for (int i = 0; i < cursorWidth; i++) {
                if (allowedColumns.contains(cursor.getColumnName(i))) {
          cellValues.add(dba.getObjectFromResultSetByType(rs,
              cursor.getColumnJavaClassName(i),
              cursor.getColumnSqlDataType(i), i + 1));
                }
            }
           
            if (cellValues.size() > 0)
                rt.addRow(new RowData(newHeader, cellValues.toArray()));
View Full Code Here

TOP

Related Classes of com.scooterframework.orm.sqldataexpress.object.Cursor

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.