com.elasticpath.persistence.support.impl
Class OrderCriterionImpl

java.lang.Object
  extended by com.elasticpath.persistence.support.impl.OrderCriterionImpl
All Implemented Interfaces:
OrderCriterion

public class OrderCriterionImpl
extends java.lang.Object
implements OrderCriterion

Implementation of OrderCriterion that constructs the appropriate criteria for order queries.


Constructor Summary
OrderCriterionImpl()
           
 
Method Summary
 java.lang.String getAdvancedOrderCriteria(AdvancedOrderSearchCriteria orderSearchCriteria)
          Return the criteria used for advanced order search.
 java.lang.String getOrderCustomerCriteria(java.lang.String propertyName, java.lang.String criteriaValue, boolean isExactMatch)
          Returns the criteria used to query by customer property of String type, i.e.
 java.lang.String getStatusCriteria(int orderStatus, int paymentStatus, int shippingStatus)
          Returns the criteria used to query by status.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrderCriterionImpl

public OrderCriterionImpl()
Method Detail

getAdvancedOrderCriteria

public java.lang.String getAdvancedOrderCriteria(AdvancedOrderSearchCriteria orderSearchCriteria)
Return the criteria used for advanced order search. Search criteria cover order properties, order customerProperties

Specified by:
getAdvancedOrderCriteria in interface OrderCriterion
Parameters:
orderSearchCriteria - the order search criteria.
Returns:
the criteria used to complete advaned order search

getOrderCustomerCriteria

public java.lang.String getOrderCustomerCriteria(java.lang.String propertyName,
                                                 java.lang.String criteriaValue,
                                                 boolean isExactMatch)
Returns the criteria used to query by customer property of String type, i.e. 'email', 'firstName', 'lastName' etc.

Specified by:
getOrderCustomerCriteria in interface OrderCriterion
Parameters:
propertyName - 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.
Returns:
the criteria used to query by order.

getStatusCriteria

public java.lang.String getStatusCriteria(int orderStatus,
                                          int paymentStatus,
                                          int shippingStatus)
Returns the criteria used to query by status.

Specified by:
getStatusCriteria in interface OrderCriterion
Parameters:
orderStatus - the status of the order
paymentStatus - the status of the payment
shippingStatus - the status of the shipping
Returns:
the criteria used to query by status