Package com.mendix.webui.reporting
Class DataSetResult
- java.lang.Object
-
- com.mendix.webui.reporting.DataSetResult
-
- All Implemented Interfaces:
IDataSetResult
public class DataSetResult extends java.lang.Object implements IDataSetResult
Provides the implementation for the result of a report request.
-
-
Constructor Summary
Constructors Constructor Description DataSetResult(java.util.LinkedHashMap<java.lang.String,java.lang.Object> columns)
Create a new data set result containing the specified columns.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addColumnType(ColumnType type)
Adds a column with the specified type to the data set.void
addRow(java.lang.Object... rowValues)
Adds a row with the specified values to this data set.java.util.LinkedHashMap<java.lang.String,java.lang.Object>
getColumns()
Returns the columns of this data set and their names.java.util.List<ColumnType>
getColumnTypes()
Returns the types of all columns in this data set.java.util.List<java.lang.Object>
getData(java.lang.String columnName)
Returns all values for the column with the specified name.long
getTotalResultCount()
Returns the total number of rows that exist.void
setColumnValues(java.lang.String columnName, java.util.List<java.lang.Object> values)
Sets the columns values for the specified column.void
setTotalResultCount(long totalResultCount)
Sets the total number of rows that exist to the specified value.
-
-
-
Method Detail
-
setColumnValues
public void setColumnValues(java.lang.String columnName, java.util.List<java.lang.Object> values)
Sets the columns values for the specified column.- Specified by:
setColumnValues
in interfaceIDataSetResult
- Parameters:
columnName
- the name of the column to changevalues
- the values to set
-
addRow
public void addRow(java.lang.Object... rowValues)
Adds a row with the specified values to this data set.- Specified by:
addRow
in interfaceIDataSetResult
- Parameters:
rowValues
- the values of the row
-
getData
public java.util.List<java.lang.Object> getData(java.lang.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 java.util.LinkedHashMap<java.lang.String,java.lang.Object> getColumns()
Returns the columns of this data set and their names.- Returns:
- the columns by name
-
getColumnTypes
public java.util.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 interfaceIDataSetResult
- Parameters:
totalResultCount
- the number of rows to set
-
-