Class ItemKeyDescriptor

  • All Implemented Interfaces:
    KeyDescriptor

    public class ItemKeyDescriptor
    extends java.lang.Object
    implements KeyDescriptor
    A primary key descriptor for a complex item type.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      KeyValue calculateKey​(java.util.Map<java.lang.String,​java.lang.Object> item)
      Calculates key value for the specified data item.
      java.util.List<KeyAttribute> getKeyAttributes()
      Finds all key attributes for the descriptor, including key attributes for the descriptor and all of its referenced key attributes
      boolean isKeyAttribute​(java.lang.String attr)
      Queries whether the specified attribute name is a name of the key attribute.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • calculateKey

        public KeyValue calculateKey​(java.util.Map<java.lang.String,​java.lang.Object> item)
        Description copied from interface: KeyDescriptor
        Calculates key value for the specified data item.
        Specified by:
        calculateKey in interface KeyDescriptor
        Parameters:
        item - Map presentation of a data item, for which the key value needs to be calculated.
        Returns:
        the calculated key value.
      • getKeyAttributes

        public java.util.List<KeyAttribute> getKeyAttributes()
        Description copied from interface: KeyDescriptor
        Finds all key attributes for the descriptor, including key attributes for the descriptor and all of its referenced key attributes
        Specified by:
        getKeyAttributes in interface KeyDescriptor
        Returns:
        a list of key attributes
      • isKeyAttribute

        public boolean isKeyAttribute​(java.lang.String attr)
        Description copied from interface: KeyDescriptor
        Queries whether the specified attribute name is a name of the key attribute.
        Specified by:
        isKeyAttribute in interface KeyDescriptor
        Parameters:
        attr - name of the attribute to enquire about
        Returns:
        true, if the specified attribute is a key attribute in this key descriptor; false otherwise.