Class DefaultReturnEntryBasedReturnableCheck

  • All Implemented Interfaces:
    ReturnableCheck

    public class DefaultReturnEntryBasedReturnableCheck
    extends java.lang.Object
    implements ReturnableCheck
    This class is used by DefaultReturnService to provide information, if specified product is returnable. The implemented algorithm will check the corresponding 'returns entries' .
    • Constructor Detail

      • DefaultReturnEntryBasedReturnableCheck

        public DefaultReturnEntryBasedReturnableCheck()
    • Method Detail

      • perform

        public boolean perform​(OrderModel order,
                               AbstractOrderEntryModel orderentry,
                               long returnQuantity)
        Determines if the product is 'returnable' on base of existing returns entries entries. 'True' will be returned, if there are no related 'returns entries' of if the quantity of the related 'returns entries' plus the specified 'return quantity' is less or equals to the total quantity of the ordered items so far.
        Specified by:
        perform in interface ReturnableCheck
        Parameters:
        order - the related original order
        orderentry - the ordered product which will be returned
        returnQuantity - the quantity of entries to be returned
        Returns:
        true if product is 'returnable'
      • setFlexibleSearchService

        public void setFlexibleSearchService​(FlexibleSearchService flexibleSearchService)