Order Entry Quantity Service
The following describes the Order Entry Quantity Service in Order Management.
Order Entry Quantity Service is part of the warehousing extension. It offers functionality to calculate the dynamic attributes defined for the OrderEntryModel.
Overview
Warehousing extension has defined some dynamic attributes for OrderEntryModel. Order Entry Quantity Service provides the calculation of these dynamic attributes.
OrderEntryQuantityService.java:
public interface OrderEntryQuantityService
{
/**
* Gets the quantity that has been shipped for the given {@link OrderEntryModel}
*
* @param orderEntryModel
* the given order entry for which we want to get the shipped quantity
* @return the quantity shipped for the given order entry
*/
Long getQuantityShipped(OrderEntryModel orderEntryModel);
/**
* Gets the quantity that has been cancelled for the given {@link OrderEntryModel}
*
* @param orderEntryModel
* the given order entry for which we want to get the cancelled quantity
* @return the quantity cancelled for the given order entry
*/
Long getQuantityCancelled(OrderEntryModel orderEntryModel);
/**
* Gets the quantity that has been allocated for the given {@link OrderEntryModel}
*
* @param orderEntryModel
* the given order entry for which we want to get the allocated quantity
* @return the quantity allocated for the given order entry
*/
Long getQuantityAllocated(OrderEntryModel orderEntryModel);
/**
* Gets the quantity that has not been allocated for the given {@link OrderEntryModel}
*
* @param orderEntryModel
* the given order entry for which we want to get the unallocated quantity
* @return the quantity unallocated for the given order entry
*/
Long getQuantityUnallocated(OrderEntryModel orderEntryModel);
/**
* Gets the pending quantity for the given {@link OrderEntryModel}
*
* @param orderEntryModel
* the given order entry for which we want to get the pending quantity
* @return the quantity pending for the given order entry
*/
Long getQuantityPending(OrderEntryModel orderEntryModel);
/**
* Gets the quantity that has been returned for the given {@link OrderEntryModel}
*
* @param orderEntryModel
* the given order entry for which we want to get the returned quantity
* @return the quantity returned for the given order entry
*/
Long getQuantityReturned(OrderEntryModel orderEntryModel);
/**
* Gets the quantity that was declined for the given {@link OrderEntryModel}
*
* @param orderEntryModel
* the given order entry for which we want to get the declined quantity
* @return the quantity declined for the given order entry
*/
Long getQuantityDeclined(OrderEntryModel orderEntryModel);
}
Spring Configuration
You can change the default implementation in the Spring configuration.
warehousing-spring.xml:
<bean id="orderEntryShippedQuantityHandler"
class="de.hybris.platform.warehousing.shipping.quantityhandlers.OrderEntryShippedQuantityHandler">
<property name="orderEntryQuantityService" ref="orderEntryQuantityService"/>
</bean>
<bean id="orderEntryReturnedQuantityHandler"
class="de.hybris.platform.warehousing.returns.impl.OrderEntryReturnedQuantityHandler">
<property name="orderEntryQuantityService" ref="orderEntryQuantityService"/>
</bean>
<bean id="orderEntryAllocatedQuantityHandler"
class="de.hybris.platform.warehousing.allocation.impl.OrderEntryAllocatedQuantityHandler">
<property name="orderEntryQuantityService" ref="orderEntryQuantityService"/>
</bean>
<bean id="orderEntryUnallocatedQuantityHandler"
class="de.hybris.platform.warehousing.allocation.impl.OrderEntryUnallocatedQuantityHandler">
<property name="orderEntryQuantityService" ref="orderEntryQuantityService"/>
</bean>
<bean id="orderEntryPendingQuantityHandler"
class="de.hybris.platform.warehousing.allocation.impl.OrderEntryPendingQuantityHandler">
<property name="orderEntryQuantityService" ref="orderEntryQuantityService"/>
</bean>
<bean id="orderEntryCancelledQuantityHandler"
class="de.hybris.platform.warehousing.cancellation.impl.OrderEntryCancelledQuantityHandler">
<property name="orderEntryQuantityService" ref="orderEntryQuantityService"/>
</bean>
<alias name="defaultOrderEntryQuantityService" alias="orderEntryQuantityService"/>
<bean id="defaultOrderEntryQuantityService"
class="de.hybris.platform.warehousing.orderentry.service.impl.DefaultOrderEntryQuantityService">
<property name="warehousingOrderEntryQuantityDao" ref="warehousingOrderEntryQuantityDao"/>
<property name="consignmentEntryQuantityService" ref="consignmentEntryQuantityService"/>
</bean>
<alias name="defaultConsignmentEntryQuantityService" alias="consignmentEntryQuantityService"/>
<bean id="defaultConsignmentEntryQuantityService"
class="de.hybris.platform.warehousing.consignmententry.service.impl.DefaultConsignmentEntryQuantityService">
<property name="warehousingConsignmentEntryQuantityDao" ref="warehousingConsignmentEntryQuantityDao"/>
</bean>
<alias name="defaultWarehousingOrderEntryQuantityDao" alias="warehousingOrderEntryQuantityDao"/>
<bean id="defaultWarehousingOrderEntryQuantityDao"
class="de.hybris.platform.warehousing.daos.impl.DefaultWarehousingOrderEntryQuantityDao">
<property name="modelService" ref="modelService"/>
<property name="flexibleSearchService" ref="flexibleSearchService"/>
</bean>
<alias name="defaultWarehousingConsignmentEntryQuantityDao" alias="warehousingConsignmentEntryQuantityDao"/>
<bean id="defaultWarehousingConsignmentEntryQuantityDao"
class="de.hybris.platform.warehousing.daos.impl.DefaultWarehousingConsignmentEntryQuantityDao">
<property name="modelService" ref="modelService"/>
<property name="flexibleSearchService" ref="flexibleSearchService"/>
</bean>