|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.samskivert.jdbc.depot.SimpleCacheKey
public class SimpleCacheKey
Convenience class that implements CacheKey as simply as possibly. This class is
typically used when the caller wants to cache a non-obvious query such as a collection,
and needs to specify their own cache key and file it under a hand-picked cache id.
| Field Summary | |
|---|---|
protected String |
_cacheId
|
protected Serializable |
_cacheKey
|
| Constructor Summary | |
|---|---|
SimpleCacheKey(Class<?> cacheClass,
Serializable cacheKey)
Construct a SimpleCacheKey associated with the given persistent class with
the given cache key. |
|
SimpleCacheKey(String cacheId)
Construct a SimpleCacheKey for a query that has no parameters whatsoever. |
|
SimpleCacheKey(String cacheId,
Serializable value)
Construct a SimpleCacheKey for the given cache id with the given cache key. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
String |
getCacheId()
Returns the id of the cache in whose scope this key makes sense. |
Serializable |
getCacheKey()
Returns the actual opaque serializable cache key under which results are stored in the cache identified by CacheKey.getCacheId(). |
int |
hashCode()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected String _cacheId
protected Serializable _cacheKey
| Constructor Detail |
|---|
public SimpleCacheKey(String cacheId)
SimpleCacheKey for a query that has no parameters whatsoever.
public SimpleCacheKey(Class<?> cacheClass,
Serializable cacheKey)
SimpleCacheKey associated with the given persistent class with
the given cache key.
public SimpleCacheKey(String cacheId,
Serializable value)
SimpleCacheKey for the given cache id with the given cache key.
| Method Detail |
|---|
public String getCacheId()
CacheKey
getCacheId in interface CacheKeypublic Serializable getCacheKey()
CacheKeyCacheKey.getCacheId().
getCacheKey in interface CacheKeypublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||