com.elasticpath.persistence.support
Interface OrderCriterion

All Known Implementing Classes:
OrderCriterionImpl

public interface OrderCriterion

OrderCriterion generates the proper criteria for order domain object.


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.
 

Method Detail

getAdvancedOrderCriteria

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

Parameters:
orderSearchCriteria - the order search criteria.
Returns:
the criteria used to complete advaned order search

getOrderCustomerCriteria

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.

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

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

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