Package org.saiku.web.rest.objects.resultset

Examples of org.saiku.web.rest.objects.resultset.Cell


      while (rs.next() && (limit == 0 || height < limit)) {
        if (height == 0) {
          width = rs.getMetaData().getColumnCount();
          header = new Cell[width];
          for (int s = 0; s < width; s++) {
            header[s] = new Cell(rs.getMetaData().getColumnName(s + 1), Cell.Type.COLUMN_HEADER);
          }
          if (width > 0) {
            rows.add(header);
            // System.out.println(" |");
          }
        }
        Cell[] row = new Cell[width];
        for (int i = 0; i < width; i++) {
          int colType = rs.getMetaData().getColumnType(i + 1);
          String content = rsch.getValue(rs, colType, i + 1);
          if (content == null) {
            content = "";
          }
          row[i] = new Cell(content, Cell.Type.DATA_CELL);
        }
        rows.add(row);
        height++;
      }
    } catch (SQLException e) {
View Full Code Here



        metaprops.putAll(dcell.getProperties());

        // TODO no properties  (NULL) for now -
        return new Cell(dcell.getFormattedValue(), metaprops, Cell.Type.DATA_CELL);
      }
      if (acell instanceof MemberCell) {
        MemberCell mcell = (MemberCell) acell;

        Properties props = new Properties();
        if (mcell != null) {
          if (mcell.getParentDimension() != null) {
            props.put("dimension", mcell.getParentDimension());
          }
          if (mcell.getUniqueName() != null) {
            props.put("uniquename", mcell.getUniqueName());
          }
          if (mcell.getHierarchy() != null) {
            props.put("hierarchy", mcell.getHierarchy());
          }
          if (mcell.getLevel() != null) {
            props.put("level", mcell.getLevel());
          }
        }
//props.putAll(mcell.getProperties());

        // TODO no properties  (NULL) for now -
        if ("row_header_header".equals(mcell.getProperty("__headertype"))) {
          headertype = Cell.Type.ROW_HEADER_HEADER;
        }
        return new Cell("" + mcell.getFormattedValue(), props, headertype);
      }

    }
    return null;
  }
View Full Code Here

TOP

Related Classes of org.saiku.web.rest.objects.resultset.Cell

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.