Interface DataSet

  • All Known Implementing Classes:
    DataSetImpl

    public interface DataSet
    • Method Detail

      • getDefinition

        DataSetDef getDefinition()
        The data set definition
      • setDefinition

        void setDefinition​(DataSetDef def)
        The data set definition
      • getUUID

        String getUUID()
        The unique data set identifier.
      • setUUID

        void setUUID​(String uuid)
        Set an unique identifier to this data set.
      • getCreationDate

        Date getCreationDate()
        The creation date
      • setCreationDate

        void setCreationDate​(Date date)
        The creation date
      • getColumnById

        DataColumn getColumnById​(String id)
        Get a column by its id.
      • getColumnByIndex

        DataColumn getColumnByIndex​(int index)
        Get a column by its index (starting at 0).
      • getColumnIndex

        int getColumnIndex​(DataColumn dataColumn)
        Get a column's internal DataSet index.
      • removeColumn

        DataSet removeColumn​(String id)
        Removes an existing column.
      • getRowCount

        int getRowCount()
        Get the number of rows in the dataset.
      • getValueAt

        Object getValueAt​(int row,
                          int column)
        Get the value at a given cell.
        Parameters:
        row - The cell row (the first row is 0).
        column - The cell column (the first column is 0).
      • getValueAt

        Object getValueAt​(int row,
                          String columnId)
        Get the value at a given cell.
        Parameters:
        row - The cell row (the first row is 0).
        columnId - The cell column id.
      • setValueAt

        DataSet setValueAt​(int row,
                           int column,
                           Object value)
        Set the value at a given cell.
        Parameters:
        row - The cell row (the first row is 0).
        column - The cell column (the first column is 0).
      • setValuesAt

        DataSet setValuesAt​(int row,
                            Object... values)
        Set all the values for a given row.
        Parameters:
        row - The cell row (the first row is 0).
      • addValuesAt

        DataSet addValuesAt​(int row,
                            Object... values)
        Add a row at the given position.
        Parameters:
        row - The cell row (the first row is 0).
      • addValues

        DataSet addValues​(Object... values)
        Add a row at the end of the data set.
      • addEmptyRowAt

        DataSet addEmptyRowAt​(int row)
        Add an empty row at the given position.
        Parameters:
        row - The cell row (the first row is 0).
      • trim

        DataSet trim​(int offset,
                     int rows)
        Returns a data set containing only the specified row sub set.
        Parameters:
        offset - The position where the row sub set starts (starting at 0).
        rows - The number of rows to get.
        Returns:
        A trimmed data set.
      • trim

        DataSet trim​(List<Integer> rows)
        Returns a data set containing only the specified row sub set.
        Parameters:
        rows - The row ordinals to add to the resulting data set.
        Returns:
        A trimmed data set.
      • getRowCountNonTrimmed

        int getRowCountNonTrimmed()
        If this data set is the result of a trim operation this method will return the total number of rows existing before trim.
        Returns:
        The total number of existing rows before any trim operation (if any) or -1 if no trim operation has been carried out.
      • setRowCountNonTrimmed

        void setRowCountNonTrimmed​(int count)
        If this data set is the result of a trim operation this method will return the total number of rows existing before trim.
      • cloneEmpty

        DataSet cloneEmpty()
        Build a data set with the same structure as this but containing no data.
      • cloneInstance

        DataSet cloneInstance()
        Build a data set with the same structure and content.
      • getEstimatedSize

        long getEstimatedSize()
        Return the estimated memory (in bytes) the data set is consuming.
        Returns:
        The number of bytes