planetj.dataengine.cache
Class KeyedRowCache

java.lang.Object
  |
  +--planetj.dataengine.cache.RowKeyTableCache
        |
        +--planetj.dataengine.cache.KeyedRowCache

public class KeyedRowCache
extends RowKeyTableCache

A cache which holds rows based on their keys. Rows without keys cannot be added to this cache. If two rows have from different tables have the same key, this cache will not confuse the two rows.


Constructor Summary
KeyedRowCache()
          KeyedRowCache constructor
 
Method Summary
 boolean add(Row row)
          Adds a Row to the cache, but only if it has a key.
 Row get(RowKey key)
          Gets a keyed row out of the cache
 boolean isContains(Row row)
          Tests if a row is present in the cache
 
Methods inherited from class planetj.dataengine.cache.RowKeyTableCache
add, get, getAll, getAll
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyedRowCache

public KeyedRowCache()
KeyedRowCache constructor

Method Detail

add

public boolean add(Row row)
            throws CMException
Adds a Row to the cache, but only if it has a key.

Returns:
If the Row was added or not
CMException

get

public Row get(RowKey key)
Gets a keyed row out of the cache

Returns:
The Row in the cache which corresponds to the key, or null if no such row exists in the cache

isContains

public boolean isContains(Row row)
                   throws CMException
Tests if a row is present in the cache

CMException