com.elasticpath.cmweb.reportservice.impl
Class OrderReportServiceImpl

java.lang.Object
  extended by com.elasticpath.service.impl.AbstractEpServiceImpl
      extended by com.elasticpath.cmweb.reportservice.impl.OrderReportServiceImpl
All Implemented Interfaces:
OrderReportService, EpService

public class OrderReportServiceImpl
extends AbstractEpServiceImpl
implements OrderReportService

Service for order based reports.


Constructor Summary
OrderReportServiceImpl()
           
 
Method Summary
 java.lang.Object getObject(long uid)
          Please don't call this method.
 int getOrderCountByStatus(int orderStatusCode)
          Get the order count by status.
 PersistenceEngine getPersistenceEngine()
          Returns the persistence engine.
 java.util.List orderSummaryReport(java.util.Date startDate, java.util.Date endDate, java.lang.Boolean cancelled)
          List order summary based on create date and whether the order is cancelled.
 java.util.List orderTotalStatsReport(java.util.Date startDate, java.util.Date endDate, java.lang.String currencyCode, boolean cancelled)
          List order total stats based on create date, currency and whether the order is cancelled.
 void setIndexSearchService(IndexSearchService indexSearchService)
          Set the indexSearchService instance.
 void setOrderStatusFactory(OrderStatusFactory orderStatusFactory)
          Sets the OrderStatusFactory instance.
 void setPersistenceEngine(PersistenceEngine persistenceEngine)
          Sets the persistence engine.
 
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.EpService
getElasticPath, setElasticPath
 

Constructor Detail

OrderReportServiceImpl

public OrderReportServiceImpl()
Method Detail

getObject

public java.lang.Object getObject(long uid)
                           throws EpServiceException
Please don't call this method. Doesn't really make sense to have a get method, however, had to implement abstract method.

Parameters:
uid - uid.
Returns:
nothing.
Throws:
EpServiceException - unimplemented.

getOrderCountByStatus

public int getOrderCountByStatus(int orderStatusCode)
Get the order count by status.

Specified by:
getOrderCountByStatus in interface OrderReportService
Parameters:
orderStatusCode - the order status code
Returns:
the number of orders with that status.

getPersistenceEngine

public PersistenceEngine getPersistenceEngine()
Returns the persistence engine.

Returns:
the persistence engine.

orderSummaryReport

public java.util.List orderSummaryReport(java.util.Date startDate,
                                         java.util.Date endDate,
                                         java.lang.Boolean cancelled)
List order summary based on create date and whether the order is cancelled. A start date and/or end date must be given--this will be enforced at a higher level.

Specified by:
orderSummaryReport in interface OrderReportService
Parameters:
startDate - the start date of the report.
endDate - the end date of the report.
cancelled - include cancelled orders.
Returns:
a list of order summary's.

orderTotalStatsReport

public java.util.List orderTotalStatsReport(java.util.Date startDate,
                                            java.util.Date endDate,
                                            java.lang.String currencyCode,
                                            boolean cancelled)
List order total stats based on create date, currency and whether the order is cancelled.

Specified by:
orderTotalStatsReport in interface OrderReportService
Parameters:
startDate - the start date of the report.
endDate - the end date of the report.
currencyCode - ISO-4217 currency code
cancelled - include cancelled orders.
Returns:
a list of order total statistics (# orders, # items, aipo, aov, total).

setIndexSearchService

public void setIndexSearchService(IndexSearchService indexSearchService)
Set the indexSearchService instance.

Parameters:
indexSearchService - the indexSearchService instance.

setOrderStatusFactory

public void setOrderStatusFactory(OrderStatusFactory orderStatusFactory)
Sets the OrderStatusFactory instance.

Parameters:
orderStatusFactory - the OrderStatusFactory instance.

setPersistenceEngine

public void setPersistenceEngine(PersistenceEngine persistenceEngine)
Sets the persistence engine.

Parameters:
persistenceEngine - the persistence engine to set.