planetj.dataengine.cache
Class RowKeyTableCache

java.lang.Object
  |
  +--planetj.dataengine.cache.RowKeyTableCache
Direct Known Subclasses:
KeyedRowCache

public class RowKeyTableCache
extends Object

A cache which holds Objects based on RowKeys and Tables.


Constructor Summary
RowKeyTableCache()
          RowKeyCache constructor comment.
 
Method Summary
 boolean add(RowKey key, TableCollection tables, Object o)
          Adds an object to the cache, based on a RowKey and Table
 Object get(RowKey key, TableCollection tables)
          Gets an Object out of the cache
 List getAll(Table table)
          Returns all the Objects for a given table that are in the cache.
 List getAll(TableCollection tc)
          Returns all the Objects for a given table collection that are in the cache.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RowKeyTableCache

public RowKeyTableCache()
RowKeyCache constructor comment.

Method Detail

add

public boolean add(RowKey key,
                   TableCollection tables,
                   Object o)
Adds an object to the cache, based on a RowKey and Table

Returns:
The old object that existed in the cache

get

public Object get(RowKey key,
                  TableCollection tables)
Gets an Object out of the cache

Returns:
The Object in the cache which corresponds to the RowKey and TableCollection, or null if no such Object exists in the cache

getAll

public List getAll(TableCollection tc)
Returns all the Objects for a given table collection that are in the cache.


getAll

public List getAll(Table table)
Returns all the Objects for a given table that are in the cache. (Objects which correspond to multiple tables are not returned by this method)