org.springframework.cache.interceptor
Class CacheOperation

java.lang.Object
  extended by org.springframework.cache.interceptor.CacheOperation
Direct Known Subclasses:
CacheableOperation, CacheEvictOperation, CachePutOperation

public abstract class CacheOperation
extends Object

Base class implementing CacheOperation.

Author:
Costin Leau

Constructor Summary
CacheOperation()
           
 
Method Summary
 boolean equals(Object other)
          This implementation compares the toString() results.
 Set<String> getCacheNames()
           
 String getCondition()
           
 String getKey()
           
 String getName()
           
protected  StringBuilder getOperationDescription()
          Return an identifying description for this caching 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.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CacheOperation

public CacheOperation()
Method Detail

getCacheNames

public Set<String> getCacheNames()

getCondition

public String getCondition()

getKey

public String getKey()

getName

public String getName()

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.

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

getOperationDescription

protected StringBuilder getOperationDescription()
Return an identifying description for this caching operation.

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