Copyright © 2005 Scientific Applications. All Rights Reserved.

com.sciapp.table.cache
Interface CacheableTableModel

All Superinterfaces:
TableModel
All Known Implementing Classes:
AbstractDatabaseTableModel, CachedListTableModel, CachedTableModel, DefaultDatabaseTableModel, DefaultPivotTableModel, DistinctDatabaseTableModel, MSAccessPivotTableModel

public interface CacheableTableModel
extends TableModel

CacheableTableModel defines methods for retrieving the non-cached data of a TableModel. This is achieved by specifying the range of rows we want to retrieve.


Method Summary
 List getUncachedRows(int from, int to)
          Retrieves the rows from the table model by specifying a row interval.
 boolean isCountCached()
          Determines whether the row count has been evaluated.
 boolean isRangedModel()
          Determines whether the cache model can fetch data in ranges.
 boolean isValueCached(int row, int column)
          Determines whether the value at the specified cell has been evaluated.
 
Methods inherited from interface javax.swing.table.TableModel
addTableModelListener, getColumnClass, getColumnCount, getColumnName, getRowCount, getValueAt, isCellEditable, removeTableModelListener, setValueAt
 

Method Detail

getUncachedRows

List getUncachedRows(int from,
                     int to)
Retrieves the rows from the table model by specifying a row interval. The following condition must be true: from >= to. The List returned must contain the row elements starting at from. However, the List may contain less elements than those specified in the range.

Parameters:
from - the starting row
to - the ending row
Returns:
a list of objects, each element of which contains a row from the table model

isCountCached

boolean isCountCached()
Determines whether the row count has been evaluated.

Returns:
true if the model's row count has already been evaluated.

isValueCached

boolean isValueCached(int row,
                      int column)
Determines whether the value at the specified cell has been evaluated.

Parameters:
row - the cell's row index
column - the cell's column index
Returns:
true if the cell value at (row, column) has already been evaluated.

isRangedModel

boolean isRangedModel()
Determines whether the cache model can fetch data in ranges.

Returns:
true if the cache model can fetch ranged data.

Copyright © 2005 Scientific Applications. All Rights Reserved.