Package org.alfresco.repo.cache.lookup
Class EntityLookupCache.EntityLookupCallbackDAOAdaptor<K2 extends Serializable,V2,VK2 extends Serializable>
java.lang.Object
org.alfresco.repo.cache.lookup.EntityLookupCache.EntityLookupCallbackDAOAdaptor<K2,V2,VK2>
- All Implemented Interfaces:
EntityLookupCache.EntityLookupCallbackDAO<K2,V2, VK2>
- Enclosing class:
- EntityLookupCache<K extends Serializable,
V, VK extends Serializable>
public abstract static class EntityLookupCache.EntityLookupCallbackDAOAdaptor<K2 extends Serializable,V2,VK2 extends Serializable>
extends Object
implements EntityLookupCache.EntityLookupCallbackDAO<K2,V2,VK2>
Adaptor for implementations that support immutable entities. The update and delete operations
throw
UnsupportedOperationException.- Since:
- 3.2
- Author:
- Derek Hulley
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintdeleteByKey(K2 key) Disallows the operation.intdeleteByValue(V2 value) Disallows the operation.findByValue(V2 value) This implementation never finds a value and is backed bygetValueKey(Object)returning nothing.getValueKey(V2 value) This implementation does not find by value and is backed byfindByValue(Object)returning nothing.intupdateValue(K2 key, V2 value) Disallows the operation.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.alfresco.repo.cache.lookup.EntityLookupCache.EntityLookupCallbackDAO
createValue, findByKey
-
Constructor Details
-
EntityLookupCallbackDAOAdaptor
public EntityLookupCallbackDAOAdaptor()
-
-
Method Details
-
findByValue
This implementation never finds a value and is backed bygetValueKey(Object)returning nothing.- Specified by:
findByValuein interfaceEntityLookupCache.EntityLookupCallbackDAO<K2 extends Serializable,V2, VK2 extends Serializable> - Parameters:
value- the value (business object) used to identify the entity (null allowed).- Returns:
- Returns null always
-
getValueKey
This implementation does not find by value and is backed byfindByValue(Object)returning nothing.- Specified by:
getValueKeyin interfaceEntityLookupCache.EntityLookupCallbackDAO<K2 extends Serializable,V2, VK2 extends Serializable> - Parameters:
value- the full value being keyed (never null)- Returns:
- Returns null always
-
updateValue
Disallows the operation.- Specified by:
updateValuein interfaceEntityLookupCache.EntityLookupCallbackDAO<K2 extends Serializable,V2, VK2 extends Serializable> - Parameters:
key- the existing key (ID) used to identify the entity (never null)value- the new value- Returns:
- Returns the row update count.
- Throws:
UnsupportedOperationException- always
-
deleteByKey
Disallows the operation.- Specified by:
deleteByKeyin interfaceEntityLookupCache.EntityLookupCallbackDAO<K2 extends Serializable,V2, VK2 extends Serializable> - Parameters:
key- the key (ID) used to identify the entity (never null)- Returns:
- Returns the row deletion count.
- Throws:
UnsupportedOperationException- always
-
deleteByValue
Disallows the operation.- Specified by:
deleteByValuein interfaceEntityLookupCache.EntityLookupCallbackDAO<K2 extends Serializable,V2, VK2 extends Serializable> - Parameters:
value- the value (business object) used to identify the enitity (null allowed)- Returns:
- Returns the row deletion count.
- Throws:
UnsupportedOperationException- always
-