|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.xorm.cache.RowCacheKeyFactory
Utility class used by the LRUCache to generate keys for the Rows it must store. This class produces a key suitable for using in a hash. This class is used, due to the anticiaption of other types of objects eventually being cached in the LRUCache.
Constructor Summary | |
RowCacheKeyFactory()
|
Method Summary | |
Object |
getCacheKey(Object value)
Take a row and return a key for it. |
Object |
makeRowPrimaryKey(Table table,
Object rowId)
Take a table and a row primary key, and make a cachable key for it. |
Object |
makeRowPrimaryKey(Table table,
Row row)
Take a table and a row, and make a cachable key for it. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RowCacheKeyFactory()
Method Detail |
public Object getCacheKey(Object value)
value
- the Row to generate the key for, as an Object
ClassCastException
- if the object is not a Row.public Object makeRowPrimaryKey(Table table, Row row)
table
- the Table the row belongs torow
- the Row to generate the key for, as an Object
public Object makeRowPrimaryKey(Table table, Object rowId)
table
- the Table the row belongs torowId
- the primary key of the Row object to be cached
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |