Class EntityLookupCache.EntityLookupCallbackDAOAdaptor<K2 extends java.io.Serializable,​V2,​VK2 extends java.io.Serializable>

  • 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 throw UnsupportedOperationException.
    Since:
    3.2
    Author:
    Derek Hulley
    • Constructor Detail

      • EntityLookupCallbackDAOAdaptor

        public EntityLookupCallbackDAOAdaptor()
    • Method Detail

      • findByValue

        public org.alfresco.util.Pair<K2,​V2> findByValue​(V2 value)
        This implementation never finds a value and is backed by getValueKey(Object) returning nothing.
        Specified by:
        findByValue in interface EntityLookupCache.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
      • updateValue

        public int updateValue​(K2 key,
                               V2 value)
        Disallows the operation.
        Specified by:
        updateValue in interface EntityLookupCache.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:
        deleteByKey in interface EntityLookupCache.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:
        deleteByValue in interface EntityLookupCache.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