Copyright © 2005 Scientific Applications. All Rights Reserved.

com.sciapp.table.cache
Interface TableCache

All Superinterfaces:
Cache
All Known Implementing Classes:
AbstractTableCache, DefaultTableCache

public interface TableCache
extends Cache

TableCache defines a cache suitable for caching tables.


Method Summary
 Object getValueAt(int row, int column)
          Retrieves the cached value at the cell at (row, column).
 boolean isValueCached(int row, int column)
          Determines whether the cell's value at (row, column) is cached.
 void put(int row, Object rowObject)
          Inserts a row in the cache.
 Object remove(int row)
          Removes a row from the cache.
 void setCacheTableModel(CacheableTableModel model)
          Assigns a CacheableTableModel that will be used to retrieve the uncached values.
 
Methods inherited from interface com.sciapp.table.cache.Cache
get, isValueCached, put, remove, removeAll
 

Method Detail

getValueAt

Object getValueAt(int row,
                  int column)
Retrieves the cached value at the cell at (row, column). If the value is not cached, this method retrieves the uncached value and inserts it in the cache store.

Parameters:
row - the cell's row index
column - the cell's column index
Returns:
the cached value

isValueCached

boolean isValueCached(int row,
                      int column)
Determines whether the cell's value at (row, column) is cached.

Parameters:
row - the cell's row index
column - the cell's column index
Returns:
true if the value is cached

setCacheTableModel

void setCacheTableModel(CacheableTableModel model)
Assigns a CacheableTableModel that will be used to retrieve the uncached values.

Parameters:
model - the cacheable table model that will be used as the source.

put

void put(int row,
         Object rowObject)
Inserts a row in the cache.

Parameters:
row - the row to insert to
rowObject - the object to insert at row

remove

Object remove(int row)
Removes a row from the cache.

Parameters:
row - the row to remove from the cache

Copyright © 2005 Scientific Applications. All Rights Reserved.