Class DataSetImpl

    • Field Detail

      • creationDate

        protected Date creationDate
      • rowCountNonTrimmed

        protected int rowCountNonTrimmed
    • Constructor Detail

      • DataSetImpl

        public DataSetImpl()
    • Method Detail

      • setDefinition

        public void setDefinition​(DataSetDef definition)
        Description copied from interface: DataSet
        The data set definition
        Specified by:
        setDefinition in interface DataSet
      • getUUID

        public String getUUID()
        Description copied from interface: DataSet
        The unique data set identifier.
        Specified by:
        getUUID in interface DataSet
      • setUUID

        public void setUUID​(String uuid)
        Description copied from interface: DataSet
        Set an unique identifier to this data set.
        Specified by:
        setUUID in interface DataSet
      • setCreationDate

        public void setCreationDate​(Date creationDate)
        Description copied from interface: DataSet
        The creation date
        Specified by:
        setCreationDate in interface DataSet
      • getColumnByIndex

        public DataColumn getColumnByIndex​(int index)
        Description copied from interface: DataSet
        Get a column by its index (starting at 0).
        Specified by:
        getColumnByIndex in interface DataSet
      • getColumnIndex

        public int getColumnIndex​(DataColumn dataColumn)
        Description copied from interface: DataSet
        Get a column's internal DataSet index.
        Specified by:
        getColumnIndex in interface DataSet
      • isEmpty

        public boolean isEmpty()
      • getRowCount

        public int getRowCount()
        Description copied from interface: DataSet
        Get the number of rows in the dataset.
        Specified by:
        getRowCount in interface DataSet
      • getRowCountNonTrimmed

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

        public void setRowCountNonTrimmed​(int rowCountNonTrimmed)
        Description copied from interface: DataSet
        If this data set is the result of a trim operation this method will return the total number of rows existing before trim.
        Specified by:
        setRowCountNonTrimmed in interface DataSet
      • getValueAt

        public Object getValueAt​(int row,
                                 String columnId)
        Description copied from interface: DataSet
        Get the value at a given cell.
        Specified by:
        getValueAt in interface DataSet
        Parameters:
        row - The cell row (the first row is 0).
        columnId - The cell column id.
      • getValueAt

        public Object getValueAt​(int row,
                                 int column)
        Description copied from interface: DataSet
        Get the value at a given cell.
        Specified by:
        getValueAt in interface DataSet
        Parameters:
        row - The cell row (the first row is 0).
        column - The cell column (the first column is 0).
      • setValueAt

        public DataSet setValueAt​(int row,
                                  int column,
                                  Object value)
        Description copied from interface: DataSet
        Set the value at a given cell.
        Specified by:
        setValueAt in interface DataSet
        Parameters:
        row - The cell row (the first row is 0).
        column - The cell column (the first column is 0).
      • addValueAt

        public DataSet addValueAt​(int row,
                                  int column,
                                  Object value)
      • addValueAt

        public DataSet addValueAt​(int column,
                                  Object value)
      • _setValueAt

        protected void _setValueAt​(int row,
                                   int column,
                                   Object value,
                                   boolean insert)
      • setValuesAt

        public DataSet setValuesAt​(int row,
                                   Object... values)
        Description copied from interface: DataSet
        Set all the values for a given row.
        Specified by:
        setValuesAt in interface DataSet
        Parameters:
        row - The cell row (the first row is 0).
      • addValuesAt

        public DataSet addValuesAt​(int row,
                                   Object... values)
        Description copied from interface: DataSet
        Add a row at the given position.
        Specified by:
        addValuesAt in interface DataSet
        Parameters:
        row - The cell row (the first row is 0).
      • addValues

        public DataSet addValues​(Object... values)
        Description copied from interface: DataSet
        Add a row at the end of the data set.
        Specified by:
        addValues in interface DataSet
      • _setValuesAt

        protected void _setValuesAt​(int row,
                                    boolean insert,
                                    Object... values)
      • addEmptyRowAt

        public DataSet addEmptyRowAt​(int row)
        Description copied from interface: DataSet
        Add an empty row at the given position.
        Specified by:
        addEmptyRowAt in interface DataSet
        Parameters:
        row - The cell row (the first row is 0).
      • _setEmptyRowAt

        protected void _setEmptyRowAt​(int row,
                                      boolean insert)
      • convertToString

        public String convertToString​(Object value)
      • convertToDouble

        public Double convertToDouble​(Object value)
      • convertToDate

        public Date convertToDate​(Object value)
      • trim

        public DataSet trim​(int offset,
                            int rows)
        Description copied from interface: DataSet
        Returns a data set containing only the specified row sub set.
        Specified by:
        trim in interface DataSet
        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

        public DataSet trim​(List<Integer> rows)
        Description copied from interface: DataSet
        Returns a data set containing only the specified row sub set.
        Specified by:
        trim in interface DataSet
        Parameters:
        rows - The row ordinals to add to the resulting data set.
        Returns:
        A trimmed data set.
      • cloneEmpty

        public DataSetImpl cloneEmpty()
        Description copied from interface: DataSet
        Build a data set with the same structure as this but containing no data.
        Specified by:
        cloneEmpty in interface DataSet
      • cloneInstance

        public DataSetImpl cloneInstance()
        Description copied from interface: DataSet
        Build a data set with the same structure and content.
        Specified by:
        cloneInstance in interface DataSet
      • getEstimatedSize

        public long getEstimatedSize()
        Description copied from interface: DataSet
        Return the estimated memory (in bytes) the data set is consuming.
        Specified by:
        getEstimatedSize in interface DataSet
        Returns:
        The number of bytes