public class OrderQueries
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
protected static java.util.ResourceBundle |
sResourceBundle
Resource Bundle
|
| Constructor and Description |
|---|
OrderQueries()
Constructs an OrderQueries object.
|
| Modifier and Type | Method and Description |
|---|---|
protected Query |
getDateRangeQuery(java.util.Date pFrom,
java.util.Date pTo)
Given two dates, contructs a query constrained by the range of these dates
|
int |
getOrderCountForCostCenterInState(java.lang.String pCostCenterId,
int[] pStates,
java.util.Collection<java.lang.String> pSiteIds)
Returns the count of orders whose state matches the pStates list for the given cost center id
and sites.
|
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.
|
int |
getOrderCountForProfileInState(java.lang.String pProfileId,
int[] pStates,
java.util.Collection<java.lang.String> pSiteIds)
Returns the count of orders whose state matches the pStates list for the given profile id
and sites.
|
java.util.List |
getOrderIdsForCostCenter(java.lang.String pCostCenterId,
int pStartIndex,
int pNumOrders,
int[] pStates,
java.lang.String pOrderByProperty,
boolean pAscending,
java.util.Collection<java.lang.String> pSiteIds)
Returns pNumOrders of the order ids for the given cost center id, in any of the given states, for any
of the given sites, optionally ordered by the given property, starting at pStartIndex.
|
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[] pStates,
java.lang.String pOrderByProperty,
boolean pAscending,
java.util.Collection<java.lang.String> pSiteIds)
Returns pNumOrders of the order ids for the given profile id, in any of the given states, for any
of the given sites, 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 |
getOrderQueryForCostCenter(java.lang.String pCostCenterId,
int[] pStates,
java.util.Collection<java.lang.String> pSiteIds,
RepositoryView pView)
Generates a query to find all orders for a given cost center
|
Query |
getOrderQueryForProfile(java.lang.String pProfileId,
int[] pStates,
java.util.Collection<java.lang.String> pSiteIds,
RepositoryView pView)
Returns the RQL query that can be executed to get the orders for the given profile
in the given states for the given sites
|
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 |
getOrdersForCostCenterInState(java.lang.String pCostCenterId,
int pStartIndex,
int pNumOrders,
int[] pStates,
java.lang.String pOrderByProperty,
boolean pAscending,
java.util.Collection<java.lang.String> pSiteIds)
Returns all the orders for the given cost center id in any of the given states in any of the given sites,
optionally ordered by the given property.
|
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[] pStates,
java.lang.String pOrderByProperty,
boolean pAscending,
java.util.Collection<java.lang.String> pSiteIds)
Returns all the orders for the given profile id in any of the given states in any of the given sites,
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
|
protected java.util.List |
loadOrdersForIds(java.util.List pOrderIds)
Deprecated.
Use OrderManager#loadOrders
|
void |
setOrderManager(OrderManager pOrderManager)
Sets property orderManager
|
void |
setOrderTools(OrderTools pOrderTools)
Sets property orderTools
|
public static java.lang.String CLASS_VERSION
protected static java.util.ResourceBundle sResourceBundle
public OrderTools getOrderTools()
public void setOrderTools(OrderTools pOrderTools)
pOrderTools - the value to set for property orderToolspublic OrderManager getOrderManager()
public void setOrderManager(OrderManager pOrderManager)
pOrderManager - the value to set for property orderManagerpublic java.util.List getOrdersForProfile(java.lang.String pProfileId)
throws CommerceException
pProfileId - the Profile idInvalidParameterException - thrown if any of the parameters are null or empty stringCommerceException - thrown if an exception occurs while accessing the repositorypublic int getOrderCountForProfile(java.lang.String pProfileId)
throws CommerceException
pProfileId - - the id of the profile whose orders are queried.CommerceExceptionpublic int getOrderCountForProfileInState(java.lang.String pProfileId,
int[] pStates)
throws CommerceException
pProfileId - - the id of the profile whose orders are countedpStates - - the list of states that are being queried for.CommerceExceptionpublic int getOrderCountForProfileInState(java.lang.String pProfileId,
int[] pStates,
java.util.Collection<java.lang.String> pSiteIds)
throws CommerceException
pProfileId - - the id of the profile whose orders are countedpStates - - the list of states that are being queried for.pSiteIds - - the sites the orders should belong to, null for all sitesCommerceExceptionpublic int getOrderCountForCostCenterInState(java.lang.String pCostCenterId,
int[] pStates,
java.util.Collection<java.lang.String> pSiteIds)
throws CommerceException
pCostCenterId - - the id of the cost center whose orders are countedpStates - - the list of states that are being queried for.pSiteIds - - the sites the orders should belong to, null for all sitesCommerceExceptionpublic java.util.List getOrdersForProfile(java.lang.String pProfileId,
int pStartIndex,
int pNumOrders)
throws CommerceException
pProfileId - the Profile idpStartIndex - 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 returnInvalidParameterException - thrown if any of the parameters are null or empty stringCommerceException - thrown if an exception occurs while accessing the repositorypublic java.util.List getOrdersForProfile(java.lang.String pProfileId,
java.lang.String pOrderByProperty,
boolean pAscending)
throws CommerceException
pProfileId - the Profile idpOrderByProperty - order the results by the given item descriptor property or nullpAscending - if pOrderByProperty is not null, true for ascending order, false for descendingInvalidParameterException - thrown if any of the parameters are null or empty stringCommerceException - thrown if an exception occurs while accessing the repositorypublic java.util.List getOrdersForProfile(java.lang.String pProfileId,
int pStartIndex,
int pNumOrders,
java.lang.String pOrderByProperty,
boolean pAscending)
throws CommerceException
pProfileId - the Profile idpStartIndex - 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 returnpOrderByProperty - order the results by the given item descriptor property or nullpAscending - if pOrderByProperty is not null, true for ascending order, false for descendingInvalidParameterException - thrown if any of the parameters are null or empty stringCommerceException - thrown if an exception occurs while accessing the repositorypublic java.util.List getOrdersForProfileInState(java.lang.String pProfileId,
int pState)
throws CommerceException
pProfileId - the Profile idpState - specifies what state the orders should be in, if -1 then no constraint is added to the queryInvalidParameterException - thrown if any of the parameters are null or empty stringCommerceException - thrown if an exception occurs while accessing the repositorypublic java.util.List getOrdersForProfileInState(java.lang.String pProfileId,
int pStartIndex,
int pNumOrders,
int pState)
throws CommerceException
pProfileId - the Profile idpStartIndex - 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 returnpState - specifies what state the orders should be in, if -1 then no constraint is added to the queryInvalidParameterException - thrown if any of the parameters are null or empty stringCommerceException - thrown if an exception occurs while accessing the repositorypublic java.util.List getOrdersForProfileInState(java.lang.String pProfileId,
int pState,
java.lang.String pOrderByProperty,
boolean pAscending)
throws CommerceException
pProfileId - the Profile idpState - specifies what state the orders should be in, if -1 then no constraint is added to the querypOrderByProperty - order the results by the given item descriptor property or nullpAscending - if pOrderByProperty is not null, true for ascending order, false for descendingInvalidParameterException - thrown if any of the parameters are null or empty stringCommerceException - thrown if an exception occurs while accessing the repositorypublic java.util.List getOrdersForProfileInState(java.lang.String pProfileId,
int pStartIndex,
int pNumOrders,
int pState,
java.lang.String pOrderByProperty,
boolean pAscending)
throws CommerceException
pProfileId - the Profile idpStartIndex - 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 returnpState - specifies what state the orders should be in, if -1 then no constraint is added to the querypOrderByProperty - order the results by the given item descriptor property or nullpAscending - if pOrderByProperty is not null, true for ascending order, false for descendingInvalidParameterException - thrown if any of the parameters are null or empty stringCommerceException - thrown if an exception occurs while accessing the repositorypublic java.util.List getOrdersForProfileInState(java.lang.String pProfileId,
int[] pStates)
throws CommerceException
pProfileId - the Profile idpStates - specifies what states the orders should be inInvalidParameterException - thrown if any of the parameters are null or empty stringCommerceException - thrown if an exception occurs while accessing the repositorypublic java.util.List getOrdersForProfileInState(java.lang.String pProfileId,
int pStartIndex,
int pNumOrders,
int[] pStates)
throws CommerceException
pProfileId - the Profile idpStartIndex - 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 returnpStates - specifies what states the orders should be inInvalidParameterException - thrown if any of the parameters are null or empty stringCommerceException - thrown if an exception occurs while accessing the repositorypublic java.util.List getOrdersForProfileInState(java.lang.String pProfileId,
int[] pStates,
java.lang.String pOrderByProperty,
boolean pAscending)
throws CommerceException
pProfileId - the Profile idpStates - specifies what states the orders should be inpOrderByProperty - order the results by the given item descriptor property or nullpAscending - if pOrderByProperty is not null, true for ascending order, false for descendingInvalidParameterException - thrown if any of the parameters are null or empty stringCommerceException - thrown if an exception occurs while accessing the repositorypublic java.util.List getOrdersForProfileInState(java.lang.String pProfileId,
int pStartIndex,
int pNumOrders,
int[] pStates,
java.lang.String pOrderByProperty,
boolean pAscending)
throws CommerceException
pProfileId - the Profile idpStartIndex - 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 returnpStates - specifies what states the orders should be inpOrderByProperty - order the results by the given item descriptor property or nullpAscending - if pOrderByProperty is not null, true for ascending order, false for descendingInvalidParameterException - thrown if any of the parameters are null or empty stringCommerceException - thrown if an exception occurs while accessing the repositorypublic java.util.List getOrdersForProfileInState(java.lang.String pProfileId,
int pStartIndex,
int pNumOrders,
int[] pStates,
java.lang.String pOrderByProperty,
boolean pAscending,
java.util.Collection<java.lang.String> pSiteIds)
throws CommerceException
pProfileId - the Profile idpStartIndex - 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 returnpStates - specifies what states the orders should be inpOrderByProperty - order the results by the given item descriptor property or nullpAscending - if pOrderByProperty is not null, true for ascending order, false for descendingpSiteIds - specifies what sites the orders should belong to, null for all sitesInvalidParameterException - thrown if any of the parameters are null or empty stringCommerceException - thrown if an exception occurs while accessing the repositorypublic java.util.List getOrdersForCostCenterInState(java.lang.String pCostCenterId,
int pStartIndex,
int pNumOrders,
int[] pStates,
java.lang.String pOrderByProperty,
boolean pAscending,
java.util.Collection<java.lang.String> pSiteIds)
throws CommerceException
pCostCenterId - the cost center idpStartIndex - 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 returnpStates - specifies what states the orders should be inpOrderByProperty - order the results by the given item descriptor property or nullpAscending - if pOrderByProperty is not null, true for ascending order, false for descendingpSiteIds - specifies what sites the orders should belong to, null for all sitesInvalidParameterException - thrown if any of the parameters are null or empty stringCommerceException - thrown if an exception occurs while accessing the repositorypublic java.util.List getOrderIdsForProfile(java.lang.String pProfileId)
throws CommerceException
pProfileId - the Profile idInvalidParameterException - thrown if any of the parameters are null or empty stringCommerceException - thrown if an exception occurs while accessing the repositorypublic java.util.List getOrderIdsForProfile(java.lang.String pProfileId,
int pStartIndex,
int pNumOrders)
throws CommerceException
pProfileId - the Profile idpStartIndex - 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 returnInvalidParameterException - thrown if any of the parameters are null or empty stringCommerceException - thrown if an exception occurs while accessing the repositorypublic java.util.List getOrderIdsForProfile(java.lang.String pProfileId,
int pState)
throws CommerceException
pProfileId - the Profile idpState - specifies what state the orders should be in, if -1 then no constraint is added to the queryInvalidParameterException - thrown if any of the parameters are null or empty stringCommerceException - thrown if an exception occurs while accessing the repositorypublic java.util.List getOrderIdsForProfile(java.lang.String pProfileId,
int pStartIndex,
int pNumOrders,
int pState)
throws CommerceException
pProfileId - the Profile idpStartIndex - 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 returnpState - specifies what state the orders should be in, if -1 then no constraint is added to the queryInvalidParameterException - thrown if any of the parameters are null or empty stringCommerceException - thrown if an exception occurs while accessing the repositorypublic java.util.List getOrderIdsForProfile(java.lang.String pProfileId,
int[] pStates)
throws CommerceException
pProfileId - the Profile idpStates - specifies what states the orders should be inInvalidParameterException - thrown if any of the parameters are null or empty stringCommerceException - thrown if an exception occurs while accessing the repositorypublic java.util.List getOrderIdsForProfile(java.lang.String pProfileId,
int pStartIndex,
int pNumOrders,
int[] pStates)
throws CommerceException
pProfileId - the Profile idpStartIndex - 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 returnpStates - specifies what states the orders should be inInvalidParameterException - thrown if any of the parameters are null or empty stringCommerceException - thrown if an exception occurs while accessing the repositorypublic java.util.List getOrderIdsForProfile(java.lang.String pProfileId,
java.lang.String pOrderByProperty,
boolean pAscending)
throws CommerceException
pProfileId - the Profile idpOrderByProperty - order the results by the given item descriptor property or nullpAscending - if pOrderByProperty is not null, true for ascending order, false for descendingInvalidParameterException - thrown if any of the parameters are null or empty stringCommerceException - thrown if an exception occurs while accessing the repositorypublic java.util.List getOrderIdsForProfile(java.lang.String pProfileId,
int pStartIndex,
int pNumOrders,
java.lang.String pOrderByProperty,
boolean pAscending)
throws CommerceException
pProfileId - the Profile idpStartIndex - 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 returnpOrderByProperty - order the results by the given item descriptor property or nullpAscending - if pOrderByProperty is not null, true for ascending order, false for descendingInvalidParameterException - thrown if any of the parameters are null or empty stringCommerceException - thrown if an exception occurs while accessing the repositorypublic java.util.List getOrderIdsForProfile(java.lang.String pProfileId,
int pState,
java.lang.String pOrderByProperty,
boolean pAscending)
throws CommerceException
pProfileId - the Profile idpState - specifies what state the orders should be in, if -1 then no constraint is added to the querypOrderByProperty - order the results by the given item descriptor property or nullpAscending - if pOrderByProperty is not null, true for ascending order, false for descendingInvalidParameterException - thrown if any of the parameters are null or empty stringCommerceException - thrown if an exception occurs while accessing the repositorypublic java.util.List getOrderIdsForProfile(java.lang.String pProfileId,
int pStartIndex,
int pNumOrders,
int pState,
java.lang.String pOrderByProperty,
boolean pAscending)
throws CommerceException
pProfileId - the Profile idpStartIndex - 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 returnpState - specifies what state the orders should be in, if -1 then no constraint is added to the querypOrderByProperty - order the results by the given item descriptor property or nullpAscending - if pOrderByProperty is not null, true for ascending order, false for descendingInvalidParameterException - thrown if any of the parameters are null or empty stringCommerceException - thrown if an exception occurs while accessing the repositorypublic java.util.List getOrderIdsForProfile(java.lang.String pProfileId,
int[] pStates,
java.lang.String pOrderByProperty,
boolean pAscending)
throws CommerceException
pProfileId - the Profile idpStates - specifies what states the orders should be inpOrderByProperty - order the results by the given item descriptor property or nullpAscending - if pOrderByProperty is not null, true for ascending order, false for descendingInvalidParameterException - thrown if any of the parameters are null or empty stringCommerceException - thrown if an exception occurs while accessing the repositorypublic java.util.List getOrderIdsForProfile(java.lang.String pProfileId,
int pStartIndex,
int pNumOrders,
int[] pStates,
java.lang.String pOrderByProperty,
boolean pAscending)
throws CommerceException
pProfileId - the Profile idpStartIndex - 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 returnpStates - specifies what states the orders should be inpOrderByProperty - order the results by the given item descriptor property or nullpAscending - if pOrderByProperty is not null, true for ascending order, false for descendingInvalidParameterException - thrown if any of the parameters are null or empty stringCommerceException - thrown if an exception occurs while accessing the repositorypublic java.util.List getOrderIdsForProfile(java.lang.String pProfileId,
int pStartIndex,
int pNumOrders,
int[] pStates,
java.lang.String pOrderByProperty,
boolean pAscending,
java.util.Collection<java.lang.String> pSiteIds)
throws CommerceException
pProfileId - the Profile idpStartIndex - 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 returnpStates - specifies what states the orders should be inpOrderByProperty - order the results by the given item descriptor property or nullpAscending - if pOrderByProperty is not null, true for ascending order, false for descendingpSiteIds - specifies what sites the orders should belong to, null for all sitesInvalidParameterException - thrown if any of the parameters are null or empty stringCommerceException - thrown if an exception occurs while accessing the repositorypublic java.util.List getOrderIdsForCostCenter(java.lang.String pCostCenterId,
int pStartIndex,
int pNumOrders,
int[] pStates,
java.lang.String pOrderByProperty,
boolean pAscending,
java.util.Collection<java.lang.String> pSiteIds)
throws CommerceException
pCostCenterId - the Cost Center idpStartIndex - 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 returnpStates - specifies what states the orders should be inpOrderByProperty - order the results by the given item descriptor property or nullpAscending - if pOrderByProperty is not null, true for ascending order, false for descendingpSiteIds - specifies what sites the orders should belong to, null for all sitesInvalidParameterException - thrown if any of the parameters are null or empty stringCommerceException - thrown if an exception occurs while accessing the repositorypublic Query getOrderQueryForProfile(java.lang.String pProfileId, int[] pStates, RepositoryView pView) throws RepositoryException
pProfileId - the Profile idpStates - specifies what states the orders should be inpView - the order RepositoryViewCommerceException - thrown if an exception occurs while accessing the repositoryRepositoryExceptionpublic Query getOrderQueryForProfile(java.lang.String pProfileId, int[] pStates, java.util.Collection<java.lang.String> pSiteIds, RepositoryView pView) throws RepositoryException
pProfileId - the Profile idpStates - specifies what states the orders should be inpSiteIds - specifies what sites the orders should belong to, null for all sitespView - the order RepositoryViewCommerceException - thrown if an exception occurs while accessing the repositoryRepositoryExceptionpublic Query getOrderQueryForCostCenter(java.lang.String pCostCenterId, int[] pStates, java.util.Collection<java.lang.String> pSiteIds, RepositoryView pView) throws RepositoryException
pCostCenterId - The cost center IdpStates - Specifies what state the orders should be inpSiteIds - Specifies what sites the orders should belong topView - the order repository viewRepositoryExceptionpublic java.util.List getOrderIdsWithinDateRange(java.util.Date pFrom,
java.util.Date pTo)
throws CommerceException
pFrom - the lower date limitpTo - the upper date limitInvalidParameterException - thrown if any of the parameters are null or empty stringCommerceException - thrown if an exception occurs while accessing the repositorypublic java.util.List getOrderIdsForProfileWithinDateRange(java.lang.String pProfileId,
java.util.Date pFrom,
java.util.Date pTo)
throws CommerceException
pProfileId - the profile to which the orders pertainpFrom - the lower date limitpTo - the upper date limitInvalidParameterException - thrown if any of the parameters are null or empty stringCommerceException - thrown if an exception occurs while accessing the repositoryprotected Query getDateRangeQuery(java.util.Date pFrom, java.util.Date pTo) throws CommerceException
pFrom - the lower date limitpTo - the upper date limitInvalidParameterException - thrown if any of the parameters are null or empty stringCommerceException - thrown if an exception occurs while accessing the repositoryprotected java.util.List loadOrdersForIds(java.util.List pOrderIds)
throws CommerceException
pOrderIds - a List of order IDsCommerceException - thrown if an exception occurs while accessing the repository