Class ActionListPriorityComparator

java.lang.Object
org.kuali.rice.kew.actionlist.dao.impl.ActionListPriorityComparator
All Implemented Interfaces:
Comparator<org.kuali.rice.kew.api.action.ActionItemContract>

public class ActionListPriorityComparator extends Object implements Comparator<org.kuali.rice.kew.api.action.ActionItemContract>
Compares an action item to another action item and determines if one item has a higher priority than the other. Therefore, calling code needs to ensure that the document and user on the item are the same. If action items for different documents are passed in, then the compare method should always return 0. If the response returned from compare is less than 0, it means the first argument is lower priority than the second. If a value greater than 0 is returned it means the first argument has a higher priority then the second. If the result returned is 0, then the two action items have the same priority.
Author:
Kuali Rice Team (rice.collab@kuali.org)
  • Constructor Details

    • ActionListPriorityComparator

      public ActionListPriorityComparator()
  • Method Details

    • compare

      public int compare(org.kuali.rice.kew.api.action.ActionItemContract actionItem1, org.kuali.rice.kew.api.action.ActionItemContract actionItem2) throws ClassCastException
      Specified by:
      compare in interface Comparator<org.kuali.rice.kew.api.action.ActionItemContract>
      Throws:
      ClassCastException
    • requiresComparison

      protected boolean requiresComparison(org.kuali.rice.kew.api.action.ActionItemContract actionItem1, org.kuali.rice.kew.api.action.ActionItemContract actionItem2)
      Returns whether or not the two action items require comparison. The Action List only operates on Action Items for a single user and we only care about comparing the action items if they are on the same document and for the same user.