Interface TableDataSource

    • Method Detail

      • getSystem

        TransactionSystem getSystem()
        Returns the TransactionSystem object that describes global properties about the data source that generated this object.
      • getDataTableDef

        DataTableDef getDataTableDef()
        Returns a DataTableDef object that defines the layout of the table that this data is in.

        This may return 'null' if there is no table definition.

      • getRowCount

        int getRowCount()
        Returns the number of rows in this data source.

        NOTE: Returns 'n' - getCellContents(column, row) is not necessarily valid for row = [0..n]. Use 'rowEnumerator' to generate an iterator for valid row values over this data source.

      • rowEnumeration

        RowEnumeration rowEnumeration()
        Returns an iterator that is used to sequentually step through all valid rows in this source. The iterator is guarenteed to return exactly 'getRowCount' elements. The row elements returned by this iterator are used in 'getCellContents' in the 'row' parameter.

        Note that this object is only defined if entries in the table are not added/remove during the lifetime of this iterator. If entries are added or removed from the table while this iterator is open, then calls to 'nextRowIndex' will be undefined.

      • getColumnScheme

        SelectableScheme getColumnScheme​(int column)
        Returns the SelectableScheme that we use as an index for rows in the given column of this source. The SelectableScheme is used to determine the relationship between cells in a column.

        ISSUE: The scheme returned here should not have the 'insert' or 'remove' methods called (ie. it should be considered immutable). Perhaps we should make a MutableSelectableScheme interface to guarentee this constraint.

      • getCellContents

        TObject getCellContents​(int column,
                                int row)
        Returns an object that represents the information in the given cell in the table. This may be an expensive operation, so calls to it should be kept to a minimum. Note that the offset between two rows is not necessarily 1. Use 'rowEnumeration' to create a row iterator.