org.kuali.rice.core.api.cache
Class CacheTarget

java.lang.Object
  extended by org.kuali.rice.core.api.mo.AbstractDataTransferObject
      extended by org.kuali.rice.core.api.cache.CacheTarget
All Implemented Interfaces:
Serializable, ModelObjectBasic, ModelObjectComplete

public final class CacheTarget
extends AbstractDataTransferObject

See Also:
Serialized Form

Method Summary
 boolean containsKey()
          Checks if an instance contains a key.
static CacheTarget entireCache(String cache)
          Creates an instance targeting a entire cache.
 String getCache()
          The name of the cache to target.
 String getKey()
          The key of an item in the cache.
static CacheTarget singleEntry(String cache, String key)
          Creates an instance targeting a single item in a cache.
 
Methods inherited from class org.kuali.rice.core.api.mo.AbstractDataTransferObject
afterUnmarshal, beforeUnmarshal, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

entireCache

public static CacheTarget entireCache(String cache)
Creates an instance targeting a entire cache.

Parameters:
cache - the name of the cache. cannot be a null of blank string.
Returns:
an instance
Throws:
IllegalArgumentException - if the cache is null or blank

singleEntry

public static CacheTarget singleEntry(String cache,
                                      String key)
Creates an instance targeting a single item in a cache.

Parameters:
cache - The name of the cache. cannot be a null of blank string.
key - The key of the item in the cache. cannot be a null of blank string.
Returns:
an instance
Throws:
IllegalArgumentException - if the cache or key is null or blank

containsKey

public boolean containsKey()
Checks if an instance contains a key.

Returns:
true if a key exists

getCache

public String getCache()
The name of the cache to target. will not return a null of blank string.

Returns:
the name.

getKey

public String getKey()
The key of an item in the cache. optional. can return null or blank string.

Returns:
the key


Copyright © 2005-2011 The Kuali Foundation. All Rights Reserved.