Class DataSetResult

java.lang.Object
com.mendix.webui.reporting.DataSetResult
All Implemented Interfaces:
IDataSetResult

public class DataSetResult extends Object implements IDataSetResult
Provides the implementation for the result of a report request.
  • Constructor Details

    • DataSetResult

      public DataSetResult(LinkedHashMap<String,Object> columns)
      Create a new data set result containing the specified columns.
      Parameters:
      columns - the columns of the data set by name
  • Method Details

    • setColumnValues

      public void setColumnValues(String columnName, List<Object> values)
      Sets the columns values for the specified column.
      Specified by:
      setColumnValues in interface IDataSetResult
      Parameters:
      columnName - the name of the column to change
      values - the values to set
    • addRow

      public void addRow(Object... rowValues)
      Adds a row with the specified values to this data set.
      Specified by:
      addRow in interface IDataSetResult
      Parameters:
      rowValues - the values of the row
    • getData

      public List<Object> getData(String columnName)
      Returns all values for the column with the specified name.
      Parameters:
      columnName - the column for which to get the data
      Returns:
      the column values if it exists, null otherwise
    • getColumns

      public LinkedHashMap<String,Object> getColumns()
      Returns the columns of this data set and their names.
      Returns:
      the columns by name
    • getColumnTypes

      public List<ColumnType> getColumnTypes()
      Returns the types of all columns in this data set.
      Returns:
      the column types
    • addColumnType

      public void addColumnType(ColumnType type)
      Adds a column with the specified type to the data set.
      Parameters:
      type - the column type
    • getTotalResultCount

      public long getTotalResultCount()
      Returns the total number of rows that exist. Note that this is not necessarily the number of rows in this data set, which may contain only a partial view of the data.
      Returns:
      the total result count
    • setTotalResultCount

      public void setTotalResultCount(long totalResultCount)
      Sets the total number of rows that exist to the specified value.
      Specified by:
      setTotalResultCount in interface IDataSetResult
      Parameters:
      totalResultCount - the number of rows to set