Class DefaultReturnOperationService.ConfirmReturnHydrationResult
- java.lang.Object
-
- com.broadleafcommerce.orderoperation.service.DefaultReturnOperationService.ConfirmReturnHydrationResult
-
- Enclosing class:
- DefaultReturnOperationService
public static class DefaultReturnOperationService.ConfirmReturnHydrationResult extends Object
An intermediary data structure used internally byReturnOperationService
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 Summary
Constructors Constructor Description 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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
canEqual(Object other)
boolean
equals(Object o)
Map<String,Integer>
getConfirmedQuantityByItemId()
Map of total quantities in which the returns are already confirmed byOrderFulfillmentItem.getId()
.protected ConfirmReturnItemRequest
getConfirmReturnItemRequest(String itemId)
Gets theConfirmReturnItemRequest
for the given item id.Map<String,ConfirmReturnItemRequest>
getConfirmReturnItemRequestByItemId()
Map ofConfirmReturnItemRequest
byOrderFulfillmentItem.getId()
.ConfirmReturnRequest
getConfirmReturnRequest()
TheConfirmReturnRequest
containing all theConfirmReturnItemRequests
List<com.broadleafcommerce.order.client.domain.OrderFulfillment>
getFulfillments()
a list ofOrderFulfillments
that belong to theOrder
Map<String,com.broadleafcommerce.order.client.domain.OrderFulfillmentItem>
getItemById()
Map ofOrderFulfillmentItem
byOrderFulfillmentItem.getId()
.com.broadleafcommerce.order.client.domain.Order
getOrder()
TheOrder
where the items being confirmed are from.Map<String,com.broadleafcommerce.order.client.domain.OrderItem>
getOrderItemById()
A map ofOrderItem
byOrderItem.getId()
.protected int
getQuantityConfirmed(String itemId)
Gets the quantity in which the returns are already confirmed for the given item id.protected int
getQuantityReturned(String itemId)
Gets the quantity that are returned but not yet confirmed for the given item id.Map<String,Integer>
getReturnQuantityByItemId()
Map of total quantities that are returned but not yet confirmed byOrderFulfillmentItem.getId()
.protected boolean
hasConfirmReturnItemRequest(String itemId)
Determines if there's anyConfirmReturnItemRequests
for the given item id.int
hashCode()
protected boolean
isItemBeingConfirmed(String itemId)
void
setConfirmedQuantityByItemId(Map<String,Integer> confirmedQuantityByItemId)
Map of total quantities in which the returns are already confirmed byOrderFulfillmentItem.getId()
.void
setConfirmReturnItemRequestByItemId(Map<String,ConfirmReturnItemRequest> confirmReturnItemRequestByItemId)
Map ofConfirmReturnItemRequest
byOrderFulfillmentItem.getId()
.void
setConfirmReturnRequest(ConfirmReturnRequest confirmReturnRequest)
TheConfirmReturnRequest
containing all theConfirmReturnItemRequests
void
setFulfillments(List<com.broadleafcommerce.order.client.domain.OrderFulfillment> fulfillments)
a list ofOrderFulfillments
that belong to theOrder
void
setItemById(Map<String,com.broadleafcommerce.order.client.domain.OrderFulfillmentItem> itemById)
Map ofOrderFulfillmentItem
byOrderFulfillmentItem.getId()
.void
setOrder(com.broadleafcommerce.order.client.domain.Order order)
TheOrder
where the items being confirmed are from.void
setOrderItemById(Map<String,com.broadleafcommerce.order.client.domain.OrderItem> orderItemById)
A map ofOrderItem
byOrderItem.getId()
.void
setReturnQuantityByItemId(Map<String,Integer> returnQuantityByItemId)
Map of total quantities that are returned but not yet confirmed byOrderFulfillmentItem.getId()
.String
toString()
-
-
-
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
-
hasConfirmReturnItemRequest
protected boolean hasConfirmReturnItemRequest(String itemId)
Determines if there's anyConfirmReturnItemRequests
for the given item id.- Parameters:
itemId
- fulfillment item id to check if there's anyConfirmReturnItemRequests
for- Returns:
- true if there is a
ConfirmReturnItemRequest
for the given item id
-
isItemBeingConfirmed
protected boolean isItemBeingConfirmed(String itemId)
-
getConfirmReturnItemRequest
protected ConfirmReturnItemRequest getConfirmReturnItemRequest(String itemId)
Gets theConfirmReturnItemRequest
for the given item id.- Parameters:
itemId
- fulfillment item id to get theConfirmReturnItemRequest
for- Returns:
- the
ConfirmReturnItemRequest
for the given item id
-
getOrder
public com.broadleafcommerce.order.client.domain.Order getOrder()
TheOrder
where the items being confirmed are from.
-
getOrderItemById
public Map<String,com.broadleafcommerce.order.client.domain.OrderItem> getOrderItemById()
A map ofOrderItem
byOrderItem.getId()
.
-
getFulfillments
public List<com.broadleafcommerce.order.client.domain.OrderFulfillment> getFulfillments()
a list ofOrderFulfillments
that belong to theOrder
-
getConfirmReturnRequest
public ConfirmReturnRequest getConfirmReturnRequest()
TheConfirmReturnRequest
containing all theConfirmReturnItemRequests
-
getConfirmedQuantityByItemId
public Map<String,Integer> getConfirmedQuantityByItemId()
Map of total quantities in which the returns are already confirmed byOrderFulfillmentItem.getId()
.
-
getReturnQuantityByItemId
public Map<String,Integer> getReturnQuantityByItemId()
Map of total quantities that are returned but not yet confirmed byOrderFulfillmentItem.getId()
.
-
getConfirmReturnItemRequestByItemId
public Map<String,ConfirmReturnItemRequest> getConfirmReturnItemRequestByItemId()
Map ofConfirmReturnItemRequest
byOrderFulfillmentItem.getId()
.
-
getItemById
public Map<String,com.broadleafcommerce.order.client.domain.OrderFulfillmentItem> getItemById()
Map ofOrderFulfillmentItem
byOrderFulfillmentItem.getId()
.
-
setOrder
public void setOrder(com.broadleafcommerce.order.client.domain.Order order)
TheOrder
where the items being confirmed are from.
-
setOrderItemById
public void setOrderItemById(Map<String,com.broadleafcommerce.order.client.domain.OrderItem> orderItemById)
A map ofOrderItem
byOrderItem.getId()
.
-
setFulfillments
public void setFulfillments(List<com.broadleafcommerce.order.client.domain.OrderFulfillment> fulfillments)
a list ofOrderFulfillments
that belong to theOrder
-
setConfirmReturnRequest
public void setConfirmReturnRequest(ConfirmReturnRequest confirmReturnRequest)
TheConfirmReturnRequest
containing all theConfirmReturnItemRequests
-
setConfirmedQuantityByItemId
public void setConfirmedQuantityByItemId(Map<String,Integer> confirmedQuantityByItemId)
Map of total quantities in which the returns are already confirmed byOrderFulfillmentItem.getId()
.
-
setReturnQuantityByItemId
public void setReturnQuantityByItemId(Map<String,Integer> returnQuantityByItemId)
Map of total quantities that are returned but not yet confirmed byOrderFulfillmentItem.getId()
.
-
setConfirmReturnItemRequestByItemId
public void setConfirmReturnItemRequestByItemId(Map<String,ConfirmReturnItemRequest> confirmReturnItemRequestByItemId)
Map ofConfirmReturnItemRequest
byOrderFulfillmentItem.getId()
.
-
setItemById
public void setItemById(Map<String,com.broadleafcommerce.order.client.domain.OrderFulfillmentItem> itemById)
Map ofOrderFulfillmentItem
byOrderFulfillmentItem.getId()
.
-
canEqual
protected boolean canEqual(Object other)
-
-