Package com.google.visualization.datasource.query

Examples of com.google.visualization.datasource.query.DataTableColumnLookup


    }
    QuerySort sortBy = query.getSort();
    // A table description column lookup is enough because sorting by a column
    // that has multiple matching columns after pivoting is impossible. For example,
    // it is impossible to sort by an aggregation column when there is a pivot.
    DataTableColumnLookup columnLookup = new DataTableColumnLookup(table);
    TableRowComparator comparator = new TableRowComparator(sortBy, locale, columnLookup);
    Collections.sort(table.getRows(), comparator);
    return table;
  }
View Full Code Here


        }
        // If the column was not found in any of the column lookups
        // calculate its value (e.g., scalar function column that was not
        // calculated in a previous stage).
        if (!wasFound) {
          DataTableColumnLookup lookup = new DataTableColumnLookup(table);
          newRow.addCell(col.getCell(lookup, sourceRow));
        }
      }
      result.addRow(newRow);
    }
View Full Code Here

    DataTable tempTable = new DataTable();
    tempTable.addColumns(newColumnDescriptions);

    // Calculate the values of the added scalar function columns in each row.
    DataTableColumnLookup lookup = new DataTableColumnLookup(table);
    for (TableRow sourceRow : table.getRows()) {
      TableRow newRow = new TableRow();
      for (TableCell sourceCell : sourceRow.getCells()) {
        newRow.addCell(sourceCell);
      }
View Full Code Here

    }
    QuerySort sortBy = query.getSort();
    // A table description column lookup is enough because sorting by a column
    // that has multiple matching columns after pivoting is impossible. For example,
    // it is impossible to sort by an aggregation column when there is a pivot.
    DataTableColumnLookup columnLookup = new DataTableColumnLookup(table);
    TableRowComparator comparator = new TableRowComparator(sortBy, locale, columnLookup);
    Collections.sort(table.getRows(), comparator);
    return table;
  }
View Full Code Here

        }
        // If the column was not found in any of the column lookups
        // calculate its value (e.g., scalar function column that was not
        // calculated in a previous stage).
        if (!wasFound) {
          DataTableColumnLookup lookup = new DataTableColumnLookup(table);
          newRow.addCell(col.getCell(lookup, sourceRow));
        }
      }
      result.addRow(newRow);
    }
View Full Code Here

    DataTable tempTable = new DataTable();
    tempTable.addColumns(newColumnDescriptions);

    // Calculate the values of the added scalar function columns in each row.
    DataTableColumnLookup lookup = new DataTableColumnLookup(table);
    for (TableRow sourceRow : table.getRows()) {
      TableRow newRow = new TableRow();
      for (TableCell sourceCell : sourceRow.getCells()) {
        newRow.addCell(sourceCell);
      }
View Full Code Here

TOP

Related Classes of com.google.visualization.datasource.query.DataTableColumnLookup

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.