Class DefaultReturnOperationService.ConfirmReturnHydrationResult

  • Enclosing class:
    DefaultReturnOperationService

    public static class DefaultReturnOperationService.ConfirmReturnHydrationResult
    extends Object
    An intermediary data structure used internally by ReturnOperationService to hold all the relevant data regarding confirms and existing returns, to prevent processing the data multiple times and make it easier to pass the data between methods.
    • Constructor Detail

      • ConfirmReturnHydrationResult

        public ConfirmReturnHydrationResult​(com.broadleafcommerce.order.client.domain.Order order,
                                            Map<String,​com.broadleafcommerce.order.client.domain.OrderItem> orderItemById,
                                            List<com.broadleafcommerce.order.client.domain.OrderFulfillment> fulfillments,
                                            ConfirmReturnRequest confirmReturnRequest,
                                            Map<String,​Integer> confirmedQuantityByItemId,
                                            Map<String,​Integer> returnQuantityByItemId,
                                            Map<String,​ConfirmReturnItemRequest> confirmReturnItemRequestByItemId,
                                            Map<String,​com.broadleafcommerce.order.client.domain.OrderFulfillmentItem> itemById)
    • Method Detail

      • getQuantityConfirmed

        protected int getQuantityConfirmed​(String itemId)
        Gets the quantity in which the returns are already confirmed for the given item id.
        Parameters:
        itemId - fulfillment item id to get the confirmed quantity for
        Returns:
        the quantity in which the returns are already confirmed by the given item id
      • getQuantityReturned

        protected int getQuantityReturned​(String itemId)
        Gets the quantity that are returned but not yet confirmed for the given item id.
        Parameters:
        itemId - fulfillment item id to get the return quantity for
        Returns:
        the quantity that are returned but not yet confirmed for the given item id
      • isItemBeingConfirmed

        protected boolean isItemBeingConfirmed​(String itemId)
      • getOrder

        public com.broadleafcommerce.order.client.domain.Order getOrder()
        The Order where the items being confirmed are from.
      • getOrderItemById

        public Map<String,​com.broadleafcommerce.order.client.domain.OrderItem> getOrderItemById()
        A map of OrderItem by OrderItem.getId().
      • getFulfillments

        public List<com.broadleafcommerce.order.client.domain.OrderFulfillment> getFulfillments()
        a list of OrderFulfillments that belong to the Order
      • getConfirmedQuantityByItemId

        public Map<String,​Integer> getConfirmedQuantityByItemId()
        Map of total quantities in which the returns are already confirmed by OrderFulfillmentItem.getId().
      • getReturnQuantityByItemId

        public Map<String,​Integer> getReturnQuantityByItemId()
        Map of total quantities that are returned but not yet confirmed by OrderFulfillmentItem.getId().
      • getItemById

        public Map<String,​com.broadleafcommerce.order.client.domain.OrderFulfillmentItem> getItemById()
        Map of OrderFulfillmentItem by OrderFulfillmentItem.getId().
      • setOrder

        public void setOrder​(com.broadleafcommerce.order.client.domain.Order order)
        The Order where the items being confirmed are from.
      • setOrderItemById

        public void setOrderItemById​(Map<String,​com.broadleafcommerce.order.client.domain.OrderItem> orderItemById)
        A map of OrderItem by OrderItem.getId().
      • setFulfillments

        public void setFulfillments​(List<com.broadleafcommerce.order.client.domain.OrderFulfillment> fulfillments)
        a list of OrderFulfillments that belong to the Order
      • setConfirmedQuantityByItemId

        public void setConfirmedQuantityByItemId​(Map<String,​Integer> confirmedQuantityByItemId)
        Map of total quantities in which the returns are already confirmed by OrderFulfillmentItem.getId().
      • setReturnQuantityByItemId

        public void setReturnQuantityByItemId​(Map<String,​Integer> returnQuantityByItemId)
        Map of total quantities that are returned but not yet confirmed by OrderFulfillmentItem.getId().
      • setItemById

        public void setItemById​(Map<String,​com.broadleafcommerce.order.client.domain.OrderFulfillmentItem> itemById)
        Map of OrderFulfillmentItem by OrderFulfillmentItem.getId().
      • canEqual

        protected boolean canEqual​(Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object