Ejemplo n.º 1
0
 public Object[] peekRowHeaders() {
   int peekRowNo = rowIndex;
   if (peekRowNo < getRowCount()) {
     return mdxMetaData.getRowHeaders()[peekRowNo];
   }
   return null;
 }
Ejemplo n.º 2
0
 public Object[] peekFlattened() {
   Object rowHeaders[][] = mdxMetaData.getRowHeaders();
   if (rowHeaders == null) {
     // we have no row headers so we can call the regular peek()
     return peek();
   }
   // get the row
   Object row[] = peek();
   if (row == null) {
     // we have got to the end
     return null;
   }
   // do we have row headers to return also?
   if (rowIndex <= rowHeaders.length) {
     // pull out the right row headers
     Object rowHeads[] = rowHeaders[rowIndex - 1];
     // create the flattened row
     Object flatRow[] = new Object[rowHeads.length + row.length];
     // copy in the row headers and row objects
     System.arraycopy(rowHeads, 0, flatRow, 0, rowHeads.length);
     System.arraycopy(row, 0, flatRow, rowHeads.length, row.length);
     return flatRow;
   }
   return row;
 }
Ejemplo n.º 3
0
 /*
  * (non-Javadoc)
  *
  * @see org.pentaho.connection.IPentahoResultSet#getColumnCount()
  */
 public int getColumnCount() {
   return mdxMetaData.getColumnCount();
 }
Ejemplo n.º 4
0
 /*
  * (non-Javadoc)
  *
  * @see org.pentaho.connection.IPentahoResultSet#getRowCount()
  */
 public int getRowCount() {
   return mdxMetaData.getRowHeaders().length;
 }