Class DefaultConsignmentBasedReturnableCheck

  • All Implemented Interfaces:
    ReturnableCheck

    public class DefaultConsignmentBasedReturnableCheck
    extends java.lang.Object
    implements ReturnableCheck
    This class is used by DefaultReturnService to provide information, if specified product is returnable.
    • Constructor Detail

      • DefaultConsignmentBasedReturnableCheck

        public DefaultConsignmentBasedReturnableCheck()
    • Method Detail

      • perform

        public boolean perform​(OrderModel order,
                               AbstractOrderEntryModel orderentry,
                               long returnQuantity)
        Determines if the product is 'returnable'.
        The following checks are implemented:
        • FALSE: if the 'return quantity' is lesser 1 OR bigger than the total 'order' quantity
        • FALSE: if there are no consignments at all
        • TRUE: if the status is SHIPEPD and the specified 'return quantity' is lower or equal than the 'shipped quantity'.
        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'
      • getModelService

        protected ModelService getModelService()
      • setModelService

        public void setModelService​(ModelService modelService)