Class DataSetResult

    • Constructor Summary

      Constructors 
      Constructor Description
      DataSetResult​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DataSetResult

        public DataSetResult​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> columns)
    • 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 interface IDataSetResult
        Parameters:
        columnName - the name of the column to change
        values - 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 interface IDataSetResult
        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 interface IDataSetResult
        Parameters:
        totalResultCount - the number of rows to set