|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatg.commerce.order.OrderQueries
public class OrderQueries
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 |
---|
public static java.lang.String CLASS_VERSION
protected static java.util.ResourceBundle sResourceBundle
Constructor Detail |
---|
public OrderQueries()
Method Detail |
---|
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 id
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- 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.
CommerceException
public 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.
CommerceException
public 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 return
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- 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 descending
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- 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 descending
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- 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 query
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- 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 query
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- 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 descending
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- 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 descending
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- 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 in
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- 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 in
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- 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 descending
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- 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 descending
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- thrown if an exception occurs while accessing the repositorypublic java.util.List getOrderIdsForProfile(java.lang.String pProfileId) throws CommerceException
pProfileId
- the Profile id
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- 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 return
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- 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 query
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- 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 query
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- 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 in
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- 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 in
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- 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 descending
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- 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 descending
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- 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 descending
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- 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 descending
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- 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 descending
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- 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 descending
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- 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 in
CommerceException
- thrown if an exception occurs while accessing the repository
RepositoryException
public java.util.List getOrderIdsWithinDateRange(java.util.Date pFrom, java.util.Date pTo) throws CommerceException
pFrom
- the lower date limitpTo
- the upper date limit
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- 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 limit
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- thrown if an exception occurs while accessing the repositoryprotected Query getDateRangeQuery(java.util.Date pFrom, java.util.Date pTo) throws CommerceException
pTo
- the upper date limitpFrom
- the lower date limit
InvalidParameterException
- thrown if any of the parameters are null or empty string
CommerceException
- thrown if an exception occurs while accessing the repository
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |