atg.commerce.order
Class OrderQueries

java.lang.Object
  extended by atg.commerce.order.OrderQueries

public class OrderQueries
extends java.lang.Object

This class contains methods for executing various types of order queries.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
protected static java.util.ResourceBundle sResourceBundle
          Resource Bundle
 
Constructor Summary
OrderQueries()
          Constructs an OrderQueries object.
 
Method Summary
protected  Query getDateRangeQuery(java.util.Date pFrom, java.util.Date pTo)
          Given two dates, contructs a query contrained by the range of these dates
 int getOrderCountForProfile(java.lang.String pProfileId)
          Returns the count of orders for the passed in profile id.
 int getOrderCountForProfileInState(java.lang.String pProfileId, int[] pStates)
          Returns the count of orders whose state matches the pStates list for the given profile id.
 java.util.List getOrderIdsForProfile(java.lang.String pProfileId)
          Returns all the order ids for the given profile id.
 java.util.List getOrderIdsForProfile(java.lang.String pProfileId, int pState)
          Returns all the order ids for the given profile id in the given state.
 java.util.List getOrderIdsForProfile(java.lang.String pProfileId, int[] pStates)
          Returns all the order ids for the given profile id in any of the given states.
 java.util.List getOrderIdsForProfile(java.lang.String pProfileId, int[] pStates, java.lang.String pOrderByProperty, boolean pAscending)
          Returns all the order ids for the given profile id in any of the given states optionally ordered by the given property.
 java.util.List getOrderIdsForProfile(java.lang.String pProfileId, int pStartIndex, int pNumOrders)
          Returns pNumOrders of the order ids for the given profile id starting at pStartIndex.
 java.util.List getOrderIdsForProfile(java.lang.String pProfileId, int pStartIndex, int pNumOrders, int pState)
          Returns pNumOrders of the order ids for the given profile id in the given state starting at pStartIndex
 java.util.List getOrderIdsForProfile(java.lang.String pProfileId, int pStartIndex, int pNumOrders, int[] pStates)
          Returns pNumOrders of the order ids for the given profile id in any of the given states starting at pStartIndex/
 java.util.List getOrderIdsForProfile(java.lang.String pProfileId, int pStartIndex, int pNumOrders, int[] pStates, java.lang.String pOrderByProperty, boolean pAscending)
          Returns pNumOrders of the order ids for the given profile id in any of the given states optionally ordered by the given property, starting at pStartIndex.
 java.util.List getOrderIdsForProfile(java.lang.String pProfileId, int pStartIndex, int pNumOrders, int pState, java.lang.String pOrderByProperty, boolean pAscending)
          Returns pNumOrders of the order ids for the given profile id in the given state optionally ordered by the given property, starting at pStartIndex.
 java.util.List getOrderIdsForProfile(java.lang.String pProfileId, int pStartIndex, int pNumOrders, java.lang.String pOrderByProperty, boolean pAscending)
          Returns all the order ids for the given profile id optionally ordered by the given property.
 java.util.List getOrderIdsForProfile(java.lang.String pProfileId, int pState, java.lang.String pOrderByProperty, boolean pAscending)
          Returns all the order ids for the given profile id in the given state optionally ordered by the given property.
 java.util.List getOrderIdsForProfile(java.lang.String pProfileId, java.lang.String pOrderByProperty, boolean pAscending)
          Returns all the order ids for the given profile id optionally ordered by the given property.
 java.util.List getOrderIdsForProfileWithinDateRange(java.lang.String pProfileId, java.util.Date pFrom, java.util.Date pTo)
          Returns a List of orders that were submitted within the given range of dates and owned by a given user
 java.util.List getOrderIdsWithinDateRange(java.util.Date pFrom, java.util.Date pTo)
          Returns a List of orders that were submitted within the given range of dates
 OrderManager getOrderManager()
          Returns property orderManager
 Query getOrderQueryForProfile(java.lang.String pProfileId, int[] pStates, RepositoryView pView)
          Returns the RQL query that can be executed to get the orders for the given profile in the given states
 java.util.List getOrdersForProfile(java.lang.String pProfileId)
          Returns all the orders for the given profile id.
 java.util.List getOrdersForProfile(java.lang.String pProfileId, int pStartIndex, int pNumOrders)
          Returns pNumOrders of the orders for the given profile id, starting with the order at position pStartIndex
 java.util.List getOrdersForProfile(java.lang.String pProfileId, int pStartIndex, int pNumOrders, java.lang.String pOrderByProperty, boolean pAscending)
          Returns pNumOrders of the orders for the given profile id, starting with the order at position pStartIndex.
 java.util.List getOrdersForProfile(java.lang.String pProfileId, java.lang.String pOrderByProperty, boolean pAscending)
          Returns all the orders for the given profile id optionally ordered by the given property.
 java.util.List getOrdersForProfileInState(java.lang.String pProfileId, int pState)
          Returns all the orders for the given profile id in the given state.
 java.util.List getOrdersForProfileInState(java.lang.String pProfileId, int[] pStates)
          Returns all the orders for the given profile id in any of the given states.
 java.util.List getOrdersForProfileInState(java.lang.String pProfileId, int[] pStates, java.lang.String pOrderByProperty, boolean pAscending)
          Returns all the orders for the given profile id in any of the given states optionally ordered by the given property.
 java.util.List getOrdersForProfileInState(java.lang.String pProfileId, int pStartIndex, int pNumOrders, int pState)
          Returns pNumOrders of the orders for the given profile id in the given state, starting at the order with index pStartIndex
 java.util.List getOrdersForProfileInState(java.lang.String pProfileId, int pStartIndex, int pNumOrders, int[] pStates)
          Returns pNumOrders of the orders for the given profile id in any of the given states starting at index pStartIndex
 java.util.List getOrdersForProfileInState(java.lang.String pProfileId, int pStartIndex, int pNumOrders, int[] pStates, java.lang.String pOrderByProperty, boolean pAscending)
          Returns all the orders for the given profile id in any of the given states optionally ordered by the given property.
 java.util.List getOrdersForProfileInState(java.lang.String pProfileId, int pStartIndex, int pNumOrders, int pState, java.lang.String pOrderByProperty, boolean pAscending)
          Returns pNumOrders of the orders for the given profile id in the given state optionally ordered by the given property.
 java.util.List getOrdersForProfileInState(java.lang.String pProfileId, int pState, java.lang.String pOrderByProperty, boolean pAscending)
          Returns all the orders for the given profile id in the given state optionally ordered by the given property.
 OrderTools getOrderTools()
          Returns property orderTools
 void setOrderManager(OrderManager pOrderManager)
          Sets property orderManager
 void setOrderTools(OrderTools pOrderTools)
          Sets property orderTools
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string


sResourceBundle

protected static java.util.ResourceBundle sResourceBundle
Resource Bundle

Constructor Detail

OrderQueries

public OrderQueries()
Constructs an OrderQueries object.

Method Detail

getOrderTools

public OrderTools getOrderTools()
Returns property orderTools

Returns:
returns property orderTools

setOrderTools

public void setOrderTools(OrderTools pOrderTools)
Sets property orderTools

Parameters:
pOrderTools - the value to set for property orderTools

getOrderManager

public OrderManager getOrderManager()
Returns property orderManager

Returns:
returns property orderManager

setOrderManager

public void setOrderManager(OrderManager pOrderManager)
Sets property orderManager

Parameters:
pOrderManager - the value to set for property orderManager

getOrdersForProfile

public java.util.List getOrdersForProfile(java.lang.String pProfileId)
                                   throws CommerceException
Returns all the orders for the given profile id.

Parameters:
pProfileId - the Profile id
Returns:
a List of all the orders for the given profile id
Throws:
InvalidParameterException - thrown if any of the parameters are null or empty string
CommerceException - thrown if an exception occurs while accessing the repository

getOrderCountForProfile

public int getOrderCountForProfile(java.lang.String pProfileId)
                            throws CommerceException
Returns the count of orders for the passed in profile id.

Parameters:
pProfileId - - the id of the profile whose orders are queried.
Throws:
CommerceException

getOrderCountForProfileInState

public int getOrderCountForProfileInState(java.lang.String pProfileId,
                                          int[] pStates)
                                   throws CommerceException
Returns the count of orders whose state matches the pStates list for the given profile id.

Parameters:
pProfileId - - the id of the profile whose orders are counted
pStates - - the list of states that are being queried for.
Throws:
CommerceException

getOrdersForProfile

public java.util.List getOrdersForProfile(java.lang.String pProfileId,
                                          int pStartIndex,
                                          int pNumOrders)
                                   throws CommerceException
Returns pNumOrders of the orders for the given profile id, starting with the order at position pStartIndex

Parameters:
pProfileId - the Profile id
pStartIndex - the index of the first order to return. (This is an index into the result set return by the repository query.)
pNumOrders - the number of orders to return
Returns:
a List of all the orders for the given profile id
Throws:
InvalidParameterException - thrown if any of the parameters are null or empty string
CommerceException - thrown if an exception occurs while accessing the repository

getOrdersForProfile

public java.util.List getOrdersForProfile(java.lang.String pProfileId,
                                          java.lang.String pOrderByProperty,
                                          boolean pAscending)
                                   throws CommerceException
Returns all the orders for the given profile id optionally ordered by the given property.

Parameters:
pProfileId - the Profile id
pOrderByProperty - order the results by the given item descriptor property or null
pAscending - if pOrderByProperty is not null, true for ascending order, false for descending
Returns:
a List of all the orders for the given profile id
Throws:
InvalidParameterException - thrown if any of the parameters are null or empty string
CommerceException - thrown if an exception occurs while accessing the repository

getOrdersForProfile

public java.util.List getOrdersForProfile(java.lang.String pProfileId,
                                          int pStartIndex,
                                          int pNumOrders,
                                          java.lang.String pOrderByProperty,
                                          boolean pAscending)
                                   throws CommerceException
Returns pNumOrders of the orders for the given profile id, starting with the order at position pStartIndex. These orders are ordered by the given property.

Parameters:
pProfileId - the Profile id
pStartIndex - the index of the first order to return. (This is an index into the result set return by the repository query.)
pNumOrders - the number of orders to return
pOrderByProperty - order the results by the given item descriptor property or null
pAscending - if pOrderByProperty is not null, true for ascending order, false for descending
Returns:
a List of all the orders for the given profile id
Throws:
InvalidParameterException - thrown if any of the parameters are null or empty string
CommerceException - thrown if an exception occurs while accessing the repository

getOrdersForProfileInState

public java.util.List getOrdersForProfileInState(java.lang.String pProfileId,
                                                 int pState)
                                          throws CommerceException
Returns all the orders for the given profile id in the given state.

Parameters:
pProfileId - the Profile id
pState - specifies what state the orders should be in, if -1 then no constraint is added to the query
Returns:
a List of all the orders for the given profile id
Throws:
InvalidParameterException - thrown if any of the parameters are null or empty string
CommerceException - thrown if an exception occurs while accessing the repository

getOrdersForProfileInState

public java.util.List getOrdersForProfileInState(java.lang.String pProfileId,
                                                 int pStartIndex,
                                                 int pNumOrders,
                                                 int pState)
                                          throws CommerceException
Returns pNumOrders of the orders for the given profile id in the given state, starting at the order with index pStartIndex

Parameters:
pProfileId - the Profile id
pStartIndex - the index of the first order to return. (This is an index into the result set return by the repository query.)
pNumOrders - the number of orders to return
pState - specifies what state the orders should be in, if -1 then no constraint is added to the query
Returns:
a List of all the orders for the given profile id
Throws:
InvalidParameterException - thrown if any of the parameters are null or empty string
CommerceException - thrown if an exception occurs while accessing the repository

getOrdersForProfileInState

public java.util.List getOrdersForProfileInState(java.lang.String pProfileId,
                                                 int pState,
                                                 java.lang.String pOrderByProperty,
                                                 boolean pAscending)
                                          throws CommerceException
Returns all the orders for the given profile id in the given state optionally ordered by the given property.

Parameters:
pProfileId - the Profile id
pState - specifies what state the orders should be in, if -1 then no constraint is added to the query
pOrderByProperty - order the results by the given item descriptor property or null
pAscending - if pOrderByProperty is not null, true for ascending order, false for descending
Returns:
a List of all the orders for the given profile id
Throws:
InvalidParameterException - thrown if any of the parameters are null or empty string
CommerceException - thrown if an exception occurs while accessing the repository

getOrdersForProfileInState

public java.util.List getOrdersForProfileInState(java.lang.String pProfileId,
                                                 int pStartIndex,
                                                 int pNumOrders,
                                                 int pState,
                                                 java.lang.String pOrderByProperty,
                                                 boolean pAscending)
                                          throws CommerceException
Returns pNumOrders of the orders for the given profile id in the given state optionally ordered by the given property. The first order returned is at index pStartIndex.

Parameters:
pProfileId - the Profile id
pStartIndex - the index of the first order to return. (This is an index into the result set return by the repository query.)
pNumOrders - the number of orders to return
pState - specifies what state the orders should be in, if -1 then no constraint is added to the query
pOrderByProperty - order the results by the given item descriptor property or null
pAscending - if pOrderByProperty is not null, true for ascending order, false for descending
Returns:
a List of all the orders for the given profile id
Throws:
InvalidParameterException - thrown if any of the parameters are null or empty string
CommerceException - thrown if an exception occurs while accessing the repository

getOrdersForProfileInState

public java.util.List getOrdersForProfileInState(java.lang.String pProfileId,
                                                 int[] pStates)
                                          throws CommerceException
Returns all the orders for the given profile id in any of the given states.

Parameters:
pProfileId - the Profile id
pStates - specifies what states the orders should be in
Returns:
a List of all the orders for the given profile id and states
Throws:
InvalidParameterException - thrown if any of the parameters are null or empty string
CommerceException - thrown if an exception occurs while accessing the repository

getOrdersForProfileInState

public java.util.List getOrdersForProfileInState(java.lang.String pProfileId,
                                                 int pStartIndex,
                                                 int pNumOrders,
                                                 int[] pStates)
                                          throws CommerceException
Returns pNumOrders of the orders for the given profile id in any of the given states starting at index pStartIndex

Parameters:
pProfileId - the Profile id
pStartIndex - the index of the first order to return. (This is an index into the result set return by the repository query.)
pNumOrders - the number of orders to return
pStates - specifies what states the orders should be in
Returns:
a List of all the orders for the given profile id and states
Throws:
InvalidParameterException - thrown if any of the parameters are null or empty string
CommerceException - thrown if an exception occurs while accessing the repository

getOrdersForProfileInState

public java.util.List getOrdersForProfileInState(java.lang.String pProfileId,
                                                 int[] pStates,
                                                 java.lang.String pOrderByProperty,
                                                 boolean pAscending)
                                          throws CommerceException
Returns all the orders for the given profile id in any of the given states optionally ordered by the given property.

Parameters:
pProfileId - the Profile id
pStates - specifies what states the orders should be in
pOrderByProperty - order the results by the given item descriptor property or null
pAscending - if pOrderByProperty is not null, true for ascending order, false for descending
Returns:
a List of all the orders for the given profile id
Throws:
InvalidParameterException - thrown if any of the parameters are null or empty string
CommerceException - thrown if an exception occurs while accessing the repository

getOrdersForProfileInState

public java.util.List getOrdersForProfileInState(java.lang.String pProfileId,
                                                 int pStartIndex,
                                                 int pNumOrders,
                                                 int[] pStates,
                                                 java.lang.String pOrderByProperty,
                                                 boolean pAscending)
                                          throws CommerceException
Returns all the orders for the given profile id in any of the given states optionally ordered by the given property.

Parameters:
pProfileId - the Profile id
pStartIndex - the index of the first order to return. (This is an index into the result set return by the repository query.)
pNumOrders - the number of orders to return
pStates - specifies what states the orders should be in
pOrderByProperty - order the results by the given item descriptor property or null
pAscending - if pOrderByProperty is not null, true for ascending order, false for descending
Returns:
a List of all the orders for the given profile id
Throws:
InvalidParameterException - thrown if any of the parameters are null or empty string
CommerceException - thrown if an exception occurs while accessing the repository

getOrderIdsForProfile

public java.util.List getOrderIdsForProfile(java.lang.String pProfileId)
                                     throws CommerceException
Returns all the order ids for the given profile id.

Parameters:
pProfileId - the Profile id
Returns:
a List of all the order ids for the given profile id
Throws:
InvalidParameterException - thrown if any of the parameters are null or empty string
CommerceException - thrown if an exception occurs while accessing the repository

getOrderIdsForProfile

public java.util.List getOrderIdsForProfile(java.lang.String pProfileId,
                                            int pStartIndex,
                                            int pNumOrders)
                                     throws CommerceException
Returns pNumOrders of the order ids for the given profile id starting at pStartIndex.

Parameters:
pProfileId - the Profile id
pStartIndex - the index of the first order to return. (This is an index into the result set return by the repository query.)
pNumOrders - the number of orders to return
Returns:
a List of all the order ids for the given profile id
Throws:
InvalidParameterException - thrown if any of the parameters are null or empty string
CommerceException - thrown if an exception occurs while accessing the repository

getOrderIdsForProfile

public java.util.List getOrderIdsForProfile(java.lang.String pProfileId,
                                            int pState)
                                     throws CommerceException
Returns all the order ids for the given profile id in the given state.

Parameters:
pProfileId - the Profile id
pState - specifies what state the orders should be in, if -1 then no constraint is added to the query
Returns:
a List of all the order ids for the given profile id
Throws:
InvalidParameterException - thrown if any of the parameters are null or empty string
CommerceException - thrown if an exception occurs while accessing the repository

getOrderIdsForProfile

public java.util.List getOrderIdsForProfile(java.lang.String pProfileId,
                                            int pStartIndex,
                                            int pNumOrders,
                                            int pState)
                                     throws CommerceException
Returns pNumOrders of the order ids for the given profile id in the given state starting at pStartIndex

Parameters:
pProfileId - the Profile id
pStartIndex - the index of the first order to return. (This is an index into the result set return by the repository query.)
pNumOrders - the number of orders to return
pState - specifies what state the orders should be in, if -1 then no constraint is added to the query
Returns:
a List of all the order ids for the given profile id
Throws:
InvalidParameterException - thrown if any of the parameters are null or empty string
CommerceException - thrown if an exception occurs while accessing the repository

getOrderIdsForProfile

public java.util.List getOrderIdsForProfile(java.lang.String pProfileId,
                                            int[] pStates)
                                     throws CommerceException
Returns all the order ids for the given profile id in any of the given states.

Parameters:
pProfileId - the Profile id
pStates - specifies what states the orders should be in
Returns:
a List of all the order ids for the given profile id and states
Throws:
InvalidParameterException - thrown if any of the parameters are null or empty string
CommerceException - thrown if an exception occurs while accessing the repository

getOrderIdsForProfile

public java.util.List getOrderIdsForProfile(java.lang.String pProfileId,
                                            int pStartIndex,
                                            int pNumOrders,
                                            int[] pStates)
                                     throws CommerceException
Returns pNumOrders of the order ids for the given profile id in any of the given states starting at pStartIndex/

Parameters:
pProfileId - the Profile id
pStartIndex - the index of the first order to return. (This is an index into the result set return by the repository query.)
pNumOrders - the number of orders to return
pStates - specifies what states the orders should be in
Returns:
a List of all the order ids for the given profile id and states
Throws:
InvalidParameterException - thrown if any of the parameters are null or empty string
CommerceException - thrown if an exception occurs while accessing the repository

getOrderIdsForProfile

public java.util.List getOrderIdsForProfile(java.lang.String pProfileId,
                                            java.lang.String pOrderByProperty,
                                            boolean pAscending)
                                     throws CommerceException
Returns all the order ids for the given profile id optionally ordered by the given property.

Parameters:
pProfileId - the Profile id
pOrderByProperty - order the results by the given item descriptor property or null
pAscending - if pOrderByProperty is not null, true for ascending order, false for descending
Returns:
a List of all the order ids for the given profile id
Throws:
InvalidParameterException - thrown if any of the parameters are null or empty string
CommerceException - thrown if an exception occurs while accessing the repository

getOrderIdsForProfile

public java.util.List getOrderIdsForProfile(java.lang.String pProfileId,
                                            int pStartIndex,
                                            int pNumOrders,
                                            java.lang.String pOrderByProperty,
                                            boolean pAscending)
                                     throws CommerceException
Returns all the order ids for the given profile id optionally ordered by the given property.

Parameters:
pProfileId - the Profile id
pStartIndex - the index of the first order to return. (This is an index into the result set return by the repository query.)
pNumOrders - the number of orders to return
pOrderByProperty - order the results by the given item descriptor property or null
pAscending - if pOrderByProperty is not null, true for ascending order, false for descending
Returns:
a List of all the order ids for the given profile id
Throws:
InvalidParameterException - thrown if any of the parameters are null or empty string
CommerceException - thrown if an exception occurs while accessing the repository

getOrderIdsForProfile

public java.util.List getOrderIdsForProfile(java.lang.String pProfileId,
                                            int pState,
                                            java.lang.String pOrderByProperty,
                                            boolean pAscending)
                                     throws CommerceException
Returns all the order ids for the given profile id in the given state optionally ordered by the given property.

Parameters:
pProfileId - the Profile id
pState - specifies what state the orders should be in, if -1 then no constraint is added to the query
pOrderByProperty - order the results by the given item descriptor property or null
pAscending - if pOrderByProperty is not null, true for ascending order, false for descending
Returns:
a List of all the order ids for the given profile id
Throws:
InvalidParameterException - thrown if any of the parameters are null or empty string
CommerceException - thrown if an exception occurs while accessing the repository

getOrderIdsForProfile

public java.util.List getOrderIdsForProfile(java.lang.String pProfileId,
                                            int pStartIndex,
                                            int pNumOrders,
                                            int pState,
                                            java.lang.String pOrderByProperty,
                                            boolean pAscending)
                                     throws CommerceException
Returns pNumOrders of the order ids for the given profile id in the given state optionally ordered by the given property, starting at pStartIndex.

Parameters:
pProfileId - the Profile id
pStartIndex - the index of the first order to return. (This is an index into the result set return by the repository query.)
pNumOrders - the number of orders to return
pState - specifies what state the orders should be in, if -1 then no constraint is added to the query
pOrderByProperty - order the results by the given item descriptor property or null
pAscending - if pOrderByProperty is not null, true for ascending order, false for descending
Returns:
a List of all the order ids for the given profile id
Throws:
InvalidParameterException - thrown if any of the parameters are null or empty string
CommerceException - thrown if an exception occurs while accessing the repository

getOrderIdsForProfile

public java.util.List getOrderIdsForProfile(java.lang.String pProfileId,
                                            int[] pStates,
                                            java.lang.String pOrderByProperty,
                                            boolean pAscending)
                                     throws CommerceException
Returns all the order ids for the given profile id in any of the given states optionally ordered by the given property.

Parameters:
pProfileId - the Profile id
pStates - specifies what states the orders should be in
pOrderByProperty - order the results by the given item descriptor property or null
pAscending - if pOrderByProperty is not null, true for ascending order, false for descending
Returns:
a List of all the order ids for the given profile id and states
Throws:
InvalidParameterException - thrown if any of the parameters are null or empty string
CommerceException - thrown if an exception occurs while accessing the repository

getOrderIdsForProfile

public java.util.List getOrderIdsForProfile(java.lang.String pProfileId,
                                            int pStartIndex,
                                            int pNumOrders,
                                            int[] pStates,
                                            java.lang.String pOrderByProperty,
                                            boolean pAscending)
                                     throws CommerceException
Returns pNumOrders of the order ids for the given profile id in any of the given states optionally ordered by the given property, starting at pStartIndex.

Parameters:
pProfileId - the Profile id
pStartIndex - the index of the first order to return. (This is an index into the result set return by the repository query.)
pNumOrders - the number of orders to return
pStates - specifies what states the orders should be in
pOrderByProperty - order the results by the given item descriptor property or null
pAscending - if pOrderByProperty is not null, true for ascending order, false for descending
Returns:
a List of all the order ids for the given profile id and states
Throws:
InvalidParameterException - thrown if any of the parameters are null or empty string
CommerceException - thrown if an exception occurs while accessing the repository

getOrderQueryForProfile

public Query getOrderQueryForProfile(java.lang.String pProfileId,
                                     int[] pStates,
                                     RepositoryView pView)
                              throws RepositoryException
Returns the RQL query that can be executed to get the orders for the given profile in the given states

Parameters:
pProfileId - the Profile id
pStates - specifies what states the orders should be in
Returns:
a List of all the order ids for the given profile id and states
Throws:
CommerceException - thrown if an exception occurs while accessing the repository
RepositoryException

getOrderIdsWithinDateRange

public java.util.List getOrderIdsWithinDateRange(java.util.Date pFrom,
                                                 java.util.Date pTo)
                                          throws CommerceException
Returns a List of orders that were submitted within the given range of dates

Parameters:
pFrom - the lower date limit
pTo - the upper date limit
Returns:
a List of Order Ids that satisfy the query parameters
Throws:
InvalidParameterException - thrown if any of the parameters are null or empty string
CommerceException - thrown if an exception occurs while accessing the repository

getOrderIdsForProfileWithinDateRange

public java.util.List getOrderIdsForProfileWithinDateRange(java.lang.String pProfileId,
                                                           java.util.Date pFrom,
                                                           java.util.Date pTo)
                                                    throws CommerceException
Returns a List of orders that were submitted within the given range of dates and owned by a given user

Parameters:
pProfileId - the profile to which the orders pertain
pFrom - the lower date limit
pTo - the upper date limit
Returns:
a List of Order Ids that satisfy the query parameters
Throws:
InvalidParameterException - thrown if any of the parameters are null or empty string
CommerceException - thrown if an exception occurs while accessing the repository

getDateRangeQuery

protected Query getDateRangeQuery(java.util.Date pFrom,
                                  java.util.Date pTo)
                           throws CommerceException
Given two dates, contructs a query contrained by the range of these dates

Parameters:
pTo - the upper date limit
pFrom - the lower date limit
Returns:
the query object
Throws:
InvalidParameterException - thrown if any of the parameters are null or empty string
CommerceException - thrown if an exception occurs while accessing the repository