com.ibm.commerce.giftregistry.beans

Class GiftRegistryItemCatalogEntryDataBeanQuickSortCompare

  • java.lang.Object
    • com.ibm.commerce.giftregistry.beans.GiftRegistryItemCatalogEntryDataBeanQuickSortCompare
  • All Implemented Interfaces:
    QuickSortCompare


    public class GiftRegistryItemCatalogEntryDataBeanQuickSortCompare
    extends java.lang.Object
    implements QuickSortCompare
    This class is used to help sort a list of GiftRegistryItemCatalogEntryDataBean's using the QuickSort algorithm
    • Constructor Summary

      Constructors 
      Constructor and Description
      GiftRegistryItemCatalogEntryDataBeanQuickSortCompare(java.text.Collator LocaleCollator, java.lang.String strOrderBy)
      Given a collator and an OrderBy value, the corresponding GiftRegistryItemCatalogEntryDataBean's can be sorted.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      int compare(java.lang.Object obj1, java.lang.Object obj2)
      Compares two GiftRegistryItemCatalogEntryDataBean objects, based on the OrderBy criteria specified in the constructor.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GiftRegistryItemCatalogEntryDataBeanQuickSortCompare

        public GiftRegistryItemCatalogEntryDataBeanQuickSortCompare(java.text.Collator LocaleCollator,
                                                                    java.lang.String strOrderBy)
        Given a collator and an OrderBy value, the corresponding GiftRegistryItemCatalogEntryDataBean's can be sorted. Possible OrderBy sort values include:
        • 1 - 'quantityBought' (most bought first)
        • 2 - 'quantityRequested' (most requested first)
        • 3 - 'quantityNeeded' (most needed first)
        • 4 - 'partNumber' (alphabetically)
        • 5 - 'price' (lowest price first)
        Parameters:
        LocaleCollator -
        strOrderBy -
    • Method Detail

      • compare

        public int compare(java.lang.Object obj1,
                           java.lang.Object obj2)
        Compares two GiftRegistryItemCatalogEntryDataBean objects, based on the OrderBy criteria specified in the constructor.
        Specified by:
        compare in interface QuickSortCompare
        Parameters:
        obj1 -
        obj2 -
        Returns:
        The result of the comparison