|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.elasticpath.service.impl.AbstractEpServiceImpl com.elasticpath.service.impl.AbstractEpPersistenceServiceImpl com.elasticpath.service.order.impl.OrderServiceImpl
public class OrderServiceImpl
Provides storage and access to Order
objects.
Constructor Summary | |
---|---|
OrderServiceImpl()
|
Method Summary | |
---|---|
Order |
add(Order order)
Adds the given order. |
Order |
addOrderReturn(long orderUid,
OrderReturn orderReturn)
Add the given OrderReturn to the order with given uid. |
java.util.List |
findAllUids()
Returns all order uids as a list. |
java.util.List |
findByCreatedDate(java.util.Date date)
Retrieves list of Order where the created date is later than the specified date. |
java.util.List |
findByUids(java.util.Collection orderUids)
Returns a list of Order based on the given uids. |
java.util.List |
findOrder(java.lang.String propertyName,
java.lang.String criteriaValue,
boolean isExactMatch)
Retrieve the list of orders, whose specified property matches the given criteria value. |
java.util.List |
findOrderAdvanced(AdvancedOrderSearchCriteria orderSearchCriteria,
int maxResults)
Advanced order search function based on the orderSearchCriteria and the max number of results to return. |
java.util.List |
findOrderByCriteria(OrderSearchCriteria orderSearchCriteria)
Retrieve the list of orders, whose specified property contain the given criteria value. |
java.util.List |
findOrderByCriteria(OrderSearchCriteria orderSearchCriteria,
int maxResults)
Retrieve the list of orders, whose specified property contain the given criteria value. |
java.util.List |
findOrderByCustomerCriteria(java.lang.String propertyName,
java.lang.String criteriaValue,
boolean isExactMatch)
Retrieve the list of orders, whose belonged customer's specified property matches the given criteria value. |
java.util.List |
findOrderByStatus(int orderStatus,
int paymentStatus,
int shipmentStatus)
Retrieve the list of orders with the specified statuses. |
java.util.List |
findUidsByModifiedDate(java.util.Date date)
Retrieves list of Order uids where the last modified date is later than the specified date. |
Order |
get(long orderUid)
Get the order with the given UID. |
java.lang.String |
getNextOrderNumber()
Returns the next order number. |
java.lang.Object |
getObject(long uid)
Generic get method for all persistable domain models. |
Order |
getOrderDetail(long uid)
Return the fully initialized order object. |
java.util.Map |
getOrderPaymentStatusMap()
Returns a map of order payment statuses. |
java.util.Map |
getOrderReturnReasonMap()
Returns a map of order return reasons. |
java.util.Map |
getOrderShipmentStatusMap()
Returns a map of order shipment statuses. |
java.util.Map |
getOrderSkuReturnQtyMap(long orderUid)
Get the orderSku uid -> returned quantity map for the order with given uid. |
java.util.Map |
getOrderStatusMap()
Returns a map of order statuses. |
java.util.List |
list()
List all orders stored in the database. |
OrderReturn |
recalculateOrderReturn(long orderUid,
OrderReturn orderReturn)
Recalculate the order return taxes, before-tax total and total. |
Order |
releaseOrderShipment(long orderUid,
long orderShipmentUid,
java.lang.String trackingCode,
boolean captureFund,
boolean sendConfEmail)
Capture the order balance amount and update the OrderShipment status on success. |
void |
setEmailService(EmailService emailService)
Set the emailService. |
void |
setIndexSearchService(IndexSearchService indexSearchService)
Set the indexSearchService instance. |
void |
setOrderPaymentStatusFactory(OrderPaymentStatusFactory orderPaymentStatusFactory)
Sets the OrderPaymentStatusFactory instance. |
void |
setOrderReturnReasonFactory(OrderReturnReasonFactory orderReturnReasonFactory)
Sets the OrderReturnReasonFactory instance. |
void |
setOrderShipmentStatusFactory(OrderShipmentStatusFactory orderShipmentStatusFactory)
Sets the OrderShipmentStatusFactory instance. |
OrderSku |
setOrderSkuProduct(OrderSku orderSku)
Retrieve the Product associated with the given orderSku based on the productUid saved. |
OrderSku |
setOrderSkuProductSku(OrderSku orderSku)
Retrieve the Product associated with the given orderSku based on the productUid saved. |
void |
setOrderStatusFactory(OrderStatusFactory orderStatusFactory)
Sets the OrderStatusFactory instance. |
void |
setPaymentTypeFactory(PaymentTypeFactory paymentTypeFactory)
Set the PaymentTypeFactory singleton. |
void |
setTaxJurisdictionService(TaxJurisdictionService taxJurisdictionService)
Set the taxJurisdictionService. |
void |
setUtility(Utility utility)
Sets the utility. |
Order |
update(Order order)
Updates the given order. |
Methods inherited from class com.elasticpath.service.impl.AbstractEpPersistenceServiceImpl |
---|
getPersistenceEngine, setPersistenceEngine |
Methods inherited from class com.elasticpath.service.impl.AbstractEpServiceImpl |
---|
getElasticPath, setElasticPath |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.elasticpath.service.EpPersistenceService |
---|
getPersistenceEngine, setPersistenceEngine |
Methods inherited from interface com.elasticpath.service.EpService |
---|
getElasticPath, setElasticPath |
Constructor Detail |
---|
public OrderServiceImpl()
Method Detail |
---|
public Order add(Order order) throws EpServiceException
add
in interface OrderService
order
- the order to add
EpServiceException
- - in case of any errorspublic Order addOrderReturn(long orderUid, OrderReturn orderReturn)
OrderReturn
to the order with given uid.
addOrderReturn
in interface OrderService
orderUid
- orderUid the uid of the order.orderReturn
- orderReturn to be added.
public java.util.List findAllUids()
findAllUids
in interface OrderService
public java.util.List findByCreatedDate(java.util.Date date)
Order
where the created date is later than the specified date.
findByCreatedDate
in interface OrderService
date
- date to compare with the created date
Order
whose created date is later than the specified datepublic java.util.List findByUids(java.util.Collection orderUids)
Order
based on the given uids. The returned orders will be populated based on the given load tuner.
findByUids
in interface OrderService
orderUids
- a collection of order uids
Order
spublic java.util.List findOrder(java.lang.String propertyName, java.lang.String criteriaValue, boolean isExactMatch)
findOrder
in interface OrderService
propertyName
- order property to search on.criteriaValue
- criteria value to be used for searching.isExactMatch
- true for doing an exact match; false for doing a fuzzy match.
public java.util.List findOrderAdvanced(AdvancedOrderSearchCriteria orderSearchCriteria, int maxResults)
findOrderAdvanced
in interface OrderService
orderSearchCriteria
- the order search criteria.maxResults
- the max number of orders to return on search.
public java.util.List findOrderByCriteria(OrderSearchCriteria orderSearchCriteria)
findOrderByCriteria
in interface OrderService
orderSearchCriteria
- criteria for order search.
public java.util.List findOrderByCriteria(OrderSearchCriteria orderSearchCriteria, int maxResults)
findOrderByCriteria
in interface OrderService
orderSearchCriteria
- criteria for order search.maxResults
- the max number of orders to return on search.
public java.util.List findOrderByCustomerCriteria(java.lang.String propertyName, java.lang.String criteriaValue, boolean isExactMatch)
findOrderByCustomerCriteria
in interface OrderService
propertyName
- order's belonged customer property to search on.criteriaValue
- criteria value to be used for searching.isExactMatch
- true for doing an exact match; false for doing a fuzzy match.
public java.util.List findOrderByStatus(int orderStatus, int paymentStatus, int shipmentStatus)
findOrderByStatus
in interface OrderService
orderStatus
- the status of the orderpaymentStatus
- the status of the paymentshipmentStatus
- the status of the shipment
public java.util.List findUidsByModifiedDate(java.util.Date date)
Order
uids where the last modified date is later than the specified date.
findUidsByModifiedDate
in interface OrderService
date
- date to compare with the last modified date
Order
whose last modified date is later than the specified datepublic Order get(long orderUid) throws EpServiceException
get
in interface OrderService
orderUid
- the order UID
EpServiceException
- - in case of any errorspublic java.lang.String getNextOrderNumber()
getNextOrderNumber
in interface OrderService
String
public java.lang.Object getObject(long uid) throws EpServiceException
getObject
in interface EpPersistenceService
getObject
in interface OrderService
uid
- the persisted instance uid
EpServiceException
- - in case of any errorspublic Order getOrderDetail(long uid) throws EpServiceException
getOrderDetail
in interface OrderService
uid
- the persisted instance uid
EpServiceException
- - in case of any errorspublic java.util.Map getOrderPaymentStatusMap()
getOrderPaymentStatusMap
in interface OrderService
public java.util.Map getOrderReturnReasonMap()
getOrderReturnReasonMap
in interface OrderService
public java.util.Map getOrderShipmentStatusMap()
getOrderShipmentStatusMap
in interface OrderService
public java.util.Map getOrderSkuReturnQtyMap(long orderUid)
getOrderSkuReturnQtyMap
in interface OrderService
orderUid
- the uid of the order.
public java.util.Map getOrderStatusMap()
getOrderStatusMap
in interface OrderService
public java.util.List list() throws EpServiceException
list
in interface OrderService
EpServiceException
- - in case of any errorspublic OrderReturn recalculateOrderReturn(long orderUid, OrderReturn orderReturn)
recalculateOrderReturn
in interface OrderService
orderUid
- the uid of the order.orderReturn
- the orderReturn to be recalculated.
public Order releaseOrderShipment(long orderUid, long orderShipmentUid, java.lang.String trackingCode, boolean captureFund, boolean sendConfEmail)
OrderShipment
status on success.
releaseOrderShipment
in interface OrderService
orderUid
- the uid of the order.orderShipmentUid
- the uid of the orderShipment to be released.trackingCode
- the trakcingCode for the orderShipment to be released.captureFund
- need to capture fund for this release or notsendConfEmail
- need to send customer a shipment confirmation email or not
public void setEmailService(EmailService emailService)
emailService
- the emailServicepublic void setIndexSearchService(IndexSearchService indexSearchService)
indexSearchService
- the indexSearchService instance.public void setOrderPaymentStatusFactory(OrderPaymentStatusFactory orderPaymentStatusFactory)
OrderPaymentStatusFactory
instance.
setOrderPaymentStatusFactory
in interface OrderService
orderPaymentStatusFactory
- the OrderPaymentStatusFactory
instance.public void setOrderReturnReasonFactory(OrderReturnReasonFactory orderReturnReasonFactory)
OrderReturnReasonFactory
instance.
setOrderReturnReasonFactory
in interface OrderService
orderReturnReasonFactory
- the OrderReturnReasonFactory
instance.public void setOrderShipmentStatusFactory(OrderShipmentStatusFactory orderShipmentStatusFactory)
OrderShipmentStatusFactory
instance.
setOrderShipmentStatusFactory
in interface OrderService
orderShipmentStatusFactory
- the OrderShipmentStatusFactory
instance.public OrderSku setOrderSkuProduct(OrderSku orderSku)
setOrderSkuProduct
in interface OrderService
orderSku
- the orderSku instatnce
public OrderSku setOrderSkuProductSku(OrderSku orderSku)
setOrderSkuProductSku
in interface OrderService
orderSku
- the orderSku instatnce
public void setOrderStatusFactory(OrderStatusFactory orderStatusFactory)
OrderStatusFactory
instance.
setOrderStatusFactory
in interface OrderService
orderStatusFactory
- the OrderStatusFactory
instance.public void setPaymentTypeFactory(PaymentTypeFactory paymentTypeFactory)
PaymentTypeFactory
singleton.
paymentTypeFactory
- the paymentTypeFactory singleton.public void setTaxJurisdictionService(TaxJurisdictionService taxJurisdictionService)
taxJurisdictionService
- the taxJurisdictionService singleton.public void setUtility(Utility utility)
utility
- the utility to setpublic Order update(Order order) throws EpServiceException
update
in interface OrderService
order
- the order to update
EpServiceException
- - in case of any errors
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |