org.alfresco.repo.cache.lookup
Class EntityLookupCache.EntityLookupCallbackDAOAdaptor

java.lang.Object
  extended by org.alfresco.repo.cache.lookup.EntityLookupCache.EntityLookupCallbackDAOAdaptor
All Implemented Interfaces:
EntityLookupCache.EntityLookupCallbackDAO
Enclosing class:
EntityLookupCache

public abstract static class EntityLookupCache.EntityLookupCallbackDAOAdaptor
extends java.lang.Object
implements EntityLookupCache.EntityLookupCallbackDAO

Adaptor for implementations that support immutable entities. The update and delete operations throw UnsupportedOperationException.

Since:
3.2

Constructor Summary
EntityLookupCache.EntityLookupCallbackDAOAdaptor()
           
 
Method Summary
 int deleteByKey(java.io.Serializable key)
          Disallows the operation.
 int deleteByValue(java.lang.Object value)
          Disallows the operation.
 org.alfresco.util.Pair findByValue(java.lang.Object value)
          This implementation never finds a value and is backed by EntityLookupCache.EntityLookupCallbackDAOAdaptor.getValueKey(Object) returning nothing.
 java.io.Serializable getValueKey(java.lang.Object value)
          This implementation does not find by value and is backed by EntityLookupCache.EntityLookupCallbackDAOAdaptor.findByValue(Object) returning nothing.
 int updateValue(java.io.Serializable key, java.lang.Object value)
          Disallows the operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.alfresco.repo.cache.lookup.EntityLookupCache.EntityLookupCallbackDAO
createValue, findByKey
 

Constructor Detail

EntityLookupCache.EntityLookupCallbackDAOAdaptor

public EntityLookupCache.EntityLookupCallbackDAOAdaptor()
Method Detail

findByValue

public org.alfresco.util.Pair findByValue(java.lang.Object value)
This implementation never finds a value and is backed by EntityLookupCache.EntityLookupCallbackDAOAdaptor.getValueKey(Object) returning nothing.

Specified by:
findByValue in interface EntityLookupCache.EntityLookupCallbackDAO
Parameters:
value - the value (business object) used to identify the entity (null allowed).
Returns:
Returns null always

getValueKey

public java.io.Serializable getValueKey(java.lang.Object value)
This implementation does not find by value and is backed by EntityLookupCache.EntityLookupCallbackDAOAdaptor.findByValue(Object) returning nothing.

Specified by:
getValueKey in interface EntityLookupCache.EntityLookupCallbackDAO
Parameters:
value - the full value being keyed (never null)
Returns:
Returns null always

updateValue

public int updateValue(java.io.Serializable key,
                       java.lang.Object value)
Disallows the operation.

Specified by:
updateValue in interface EntityLookupCache.EntityLookupCallbackDAO
Parameters:
key - the existing key (ID) used to identify the entity (never null)
value - the new value
Returns:
Returns the row update count.
Throws:
java.lang.UnsupportedOperationException - always

deleteByKey

public int deleteByKey(java.io.Serializable key)
Disallows the operation.

Specified by:
deleteByKey in interface EntityLookupCache.EntityLookupCallbackDAO
Parameters:
key - the key (ID) used to identify the entity (never null)
Returns:
Returns the row deletion count.
Throws:
java.lang.UnsupportedOperationException - always

deleteByValue

public int deleteByValue(java.lang.Object value)
Disallows the operation.

Specified by:
deleteByValue in interface EntityLookupCache.EntityLookupCallbackDAO
Parameters:
value - the value (business object) used to identify the enitity (null allowed)
Returns:
Returns the row deletion count.
Throws:
java.lang.UnsupportedOperationException - always


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.