Package org.alfresco.repo.cache.lookup
Class EntityLookupCache.EntityLookupCallbackDAOAdaptor<K2 extends java.io.Serializable,V2,VK2 extends java.io.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 java.io.Serializable,V,VK extends java.io.Serializable>
public abstract static class EntityLookupCache.EntityLookupCallbackDAOAdaptor<K2 extends java.io.Serializable,V2,VK2 extends java.io.Serializable> extends java.lang.Object implements EntityLookupCache.EntityLookupCallbackDAO<K2,V2,VK2>
Adaptor for implementations that support immutable entities. The update and delete operations throwUnsupportedOperationException.- Since:
- 3.2
- Author:
- Derek Hulley
-
-
Constructor Summary
Constructors Constructor Description EntityLookupCallbackDAOAdaptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intdeleteByKey(K2 key)Disallows the operation.intdeleteByValue(V2 value)Disallows the operation.org.alfresco.util.Pair<K2,V2>findByValue(V2 value)This implementation never finds a value and is backed bygetValueKey(Object)returning nothing.VK2getValueKey(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, wait
-
Methods inherited from interface org.alfresco.repo.cache.lookup.EntityLookupCache.EntityLookupCallbackDAO
createValue, findByKey
-
-
-
-
Method Detail
-
findByValue
public org.alfresco.util.Pair<K2,V2> findByValue(V2 value)
This implementation never finds a value and is backed bygetValueKey(Object)returning nothing.- Specified by:
findByValuein interfaceEntityLookupCache.EntityLookupCallbackDAO<K2 extends java.io.Serializable,V2,VK2 extends java.io.Serializable>- Parameters:
value- the value (business object) used to identify the entity (null allowed).- Returns:
- Returns null always
-
getValueKey
public VK2 getValueKey(V2 value)
This implementation does not find by value and is backed byfindByValue(Object)returning nothing.- Specified by:
getValueKeyin interfaceEntityLookupCache.EntityLookupCallbackDAO<K2 extends java.io.Serializable,V2,VK2 extends java.io.Serializable>- Parameters:
value- the full value being keyed (never null)- Returns:
- Returns null always
-
updateValue
public int updateValue(K2 key, V2 value)
Disallows the operation.- Specified by:
updateValuein interfaceEntityLookupCache.EntityLookupCallbackDAO<K2 extends java.io.Serializable,V2,VK2 extends java.io.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:
java.lang.UnsupportedOperationException- always
-
deleteByKey
public int deleteByKey(K2 key)
Disallows the operation.- Specified by:
deleteByKeyin interfaceEntityLookupCache.EntityLookupCallbackDAO<K2 extends java.io.Serializable,V2,VK2 extends java.io.Serializable>- 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(V2 value)
Disallows the operation.- Specified by:
deleteByValuein interfaceEntityLookupCache.EntityLookupCallbackDAO<K2 extends java.io.Serializable,V2,VK2 extends java.io.Serializable>- Parameters:
value- the value (business object) used to identify the enitity (null allowed)- Returns:
- Returns the row deletion count.
- Throws:
java.lang.UnsupportedOperationException- always
-
-