org.springframework.cache.interceptor
Class DefaultCacheUpdateDefinition

java.lang.Object
  extended by org.springframework.cache.interceptor.DefaultCacheUpdateDefinition
All Implemented Interfaces:
CacheDefinition, CacheUpdateDefinition

public class DefaultCacheUpdateDefinition
extends Object
implements CacheUpdateDefinition

Default implementation of the CacheUpdateDefinition interface.

Author:
Costin Leau

Constructor Summary
DefaultCacheUpdateDefinition()
           
 
Method Summary
 boolean equals(Object other)
          This implementation compares the toString() results.
 Set<String> getCacheNames()
          Returns the names of the cache against which this operation is performed.
 String getCondition()
          Returns the SpEL expression conditioning the operation.
protected  StringBuilder getDefinitionDescription()
          Return an identifying description for this caching definition.
 String getKey()
          Returns the SpEL expression identifying the cache key.
 String getName()
          Returns the name of this operation.
 int hashCode()
          This implementation returns toString()'s hash code.
 void setCacheName(String cacheName)
           
 void setCacheNames(String[] cacheNames)
           
 void setCondition(String condition)
           
 void setKey(String key)
           
 void setName(String name)
           
 String toString()
          Return an identifying description for this cache operation definition.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.springframework.cache.interceptor.CacheUpdateDefinition
getKey
 
Methods inherited from interface org.springframework.cache.interceptor.CacheDefinition
getCacheNames, getCondition, getName
 

Constructor Detail

DefaultCacheUpdateDefinition

public DefaultCacheUpdateDefinition()
Method Detail

getCacheNames

public Set<String> getCacheNames()
Description copied from interface: CacheDefinition
Returns the names of the cache against which this operation is performed.

Specified by:
getCacheNames in interface CacheDefinition
Returns:
names of the cache on which the operation is performed.

getCondition

public String getCondition()
Description copied from interface: CacheDefinition
Returns the SpEL expression conditioning the operation.

Specified by:
getCondition in interface CacheDefinition
Returns:
operation condition (as SpEL expression).

getKey

public String getKey()
Description copied from interface: CacheDefinition
Returns the SpEL expression identifying the cache key.

Specified by:
getKey in interface CacheDefinition
Returns:

getName

public String getName()
Description copied from interface: CacheDefinition
Returns the name of this operation. Can be null. In case of Spring's declarative caching, the exposed name will be: fully qualified class name.method name.

Specified by:
getName in interface CacheDefinition
Returns:
the operation name

setCacheName

public void setCacheName(String cacheName)

setCacheNames

public void setCacheNames(String[] cacheNames)

setCondition

public void setCondition(String condition)

setKey

public void setKey(String key)

setName

public void setName(String name)

equals

public boolean equals(Object other)
This implementation compares the toString() results.

Overrides:
equals in class Object
See Also:
toString()

hashCode

public int hashCode()
This implementation returns toString()'s hash code.

Overrides:
hashCode in class Object
See Also:
toString()

toString

public String toString()
Return an identifying description for this cache operation definition.

Has to be overridden in subclasses for correct equals and hashCode behavior. Alternatively, equals(java.lang.Object) and hashCode() can be overridden themselves.

Overrides:
toString in class Object

getDefinitionDescription

protected StringBuilder getDefinitionDescription()
Return an identifying description for this caching definition.

Available to subclasses, for inclusion in their toString() result.