com.ibm.commerce.order.beans
Class OrderListDataBean

java.lang.Object
  |
  +--com.ibm.commerce.order.beansrc.OrderListDataBeanBase
        |
        +--com.ibm.commerce.order.beans.OrderListDataBean

public class OrderListDataBean
extends com.ibm.commerce.order.beansrc.OrderListDataBeanBase

The OrderListDataBean can operate in three modes depending on the values of order_state,channelStoreId, and currentPendingOrders: Mode 1: when order_state is specified This DataBean when populated will give a list of Order access beans/databeans for those orders that are of the specified status,user, and/or the specified stores. If relType is specified, only orders of the specified relType(initial/selection/final/submmission)and status belonging to the specified user will be returned. Note: The orders returned can be scoped by date using setStartEndDateAndScopeMethod() Mode 2: when channelStoreId is specified The OrderListDataBean can also be used to retrieve Order access beans by Channel Store Order status(channelStoreOrderStatus) described below a = not transferred b = partly transferred c = fully transferred d = processed and Channel Store ID (channelStoreId) Note: setStartEndDateAndScopeMethod(1) is the only supported scoping option Note: For mode a (not transferred orders) and b (partly transferred orders), there is an option to filter out orders that do not have a description. To enable filtering, use setFilterOrdersWithNoDescription(boolean) Mode 3: when currentPendingOrders is set to true The DataBean when populated will return a list of Orders access beans/databeans for the orders that belong to the specified user and store. Note: setStartEndDateAndScopeMethod() will have no effect in Mode 3 Sorting: There is no sorting by default. To enable sorting setSortMethodId(int sortMethodId) to one of the following values: 0=no sorting 1=sort by lastupdate 2=sort by storeentId 3=sort by status P,W,N,F,G,S 4=sort by order description 5=sort by distributor order number 6=sort by display name 7=sort by order id 8=sort by order status and order fulfillment status Sorting order {"P", "W", "N", "F", "G-C","G-S", "G-I" "S"}. "G-C" means that orders.status=G and ordstat.ostatus="C". Similarily, " G-S" and "G-I" means orders.status=G and ordstat.ostatus="S" and "I" respectively. 9=sort by timeplaced 10=sort by timeplaced and lastupdate(timeplace takes precedence,if timeplaced is null, use lastupdate) To modify the sorting order: use setAscendingSortOrder() or setDescendingSortOrder()

See Also:
Serialized Form

Field Summary
static java.lang.String COPYRIGHT
          The internal copyright field.
 
Constructor Summary
OrderListDataBean()
          OrderListDataBean constructor comment.
 
Method Summary
 boolean fulfills(java.lang.Long member, java.lang.String relationship)
          Access control - fulfills
 java.lang.Integer getChannelStoreId()
          Gets the ChannelStoreId
 java.lang.String getChannelStoreOrderStatus()
          Gets the ChannelStoreOrderStatus a = not transferred b = partly transferred c = fully transferred d = processed
 java.lang.String[] getChannelStoreOrderStatusList()
          Gets the ChannelStoreOrderStatus a = not transferred b = partly transferred c = fully transferred d = processed
  CommandContext getCommandContext()
          Get the command context.
 int getNumberOfOrders()
          Get the number of orders
  OrderDataBean[] getOrderDataBeans()
          Get the list of order data beans.
  OrderDataBean[] getOrderDataBeans(int startIndex, int endIndex)
          Returns a view of the portion of the list of orders between the specified startIndex, inclusive, and endIndex, exclusive.
  OrderDataBean[] getOrderDataBeansByPageNumber(int page)
          Returns a list of order databeans by the page number Note: page number starts from 1
  OrderListDataBean[] getOrderListDataBeanSortByDisplayName()
          Returns Vector of orderlist databeans grouped by distributor display name Side Effect: SortMethodId will be set to 6, and the orders will be sorted by display name
 java.util.Vector getOrders()
          Get the list of order access beans.
 java.lang.String getOrderStatus()
          Get the status of the order.
 java.lang.String[] getOrderStatusList()
          Get the list of order status
 java.lang.Long getOwner()
          Get owner
 java.lang.String getRelType()
          Gets the relType
  TypedProperty getRequestProperties()
          Get the request properties.
 int getSortMethodId()
          Gets the inSortMethodId
 java.lang.Integer getStoreId()
          Returns store Id
 boolean isFilterOrdersWithNoDescription()
          Returns the filterOrdersWithNoDescription.
 void populate()
          Provides a list of Order AccessBean for those orders that are of the specified status and/or the specified stores.
 void setAscendingSortOrder()
          Sets ascending sort order
 void setChannelStoreId(java.lang.Integer inChannelStoreId)
          Sets the ChannelStoreId
 void setChannelStoreOrderStatus(java.lang.String istrChannelStoreOrderStatus)
          Sets the ChannelStoreOrderStatus a = not transferred b = partly transferred c = fully transferred d = processed
 void setChannelStoreOrderStatus(java.lang.String[] astrChannelStoreOrderStatusList)
          Sets the ChannelStoreOrderStatus a = not transferred b = partly transferred c = fully transferred d = processed
 void setCommandContext( CommandContext acommandContext)
          Set the command context.
 void setDescendingSortOrder()
          Sets ascending sort order
 void setFetchCurrentPendingOrder(boolean trueFalse)
          Specify whether the databean should be populated with current pending orders with this method
 void setFilterOrdersWithNoDescription(boolean filterOrdersWithNoDescription)
          Sets the filterOrdersWithNoDescription.
 void setMaxRows(int aMaxRows)
          Specify the maximum number of rows to be returned Default value is 400 rows
 void setOrderStatus(java.lang.String aStatus)
          Set the status for retrieving those order of that status.
 void setOrderStatus(java.lang.String[] aStatusList)
          Set the list of status for retrieving those order.
 void setPageSize(int aPageSize)
          Specify the page size for getOrderDataBeansByPageNumber(int pageNumber) Default value is 20
 void setRelType(java.lang.String istrRelType)
          Sets the relType
 void setRequestProperties( TypedProperty aParam)
          Set the request properties.
 void setSortMethodId(int inSortMethodId)
          Sets the inSortMethodId
 void setStartEndDateAndScopeMethod(java.sql.Timestamp argStartDate, java.sql.Timestamp argEndDate, int argScopeMethod)
          Specify the start and end date to be used to limit the scope of Orders retrieval Scope Method 1: start and end date will be compared with the lastupdate field Scope Method 2: start and end date will be compare with the timeplaced field Scope Method 3: start and end date will be compared with the timeplaced field, if timeplcaed is null, lastupdate will be used instead.
 void setStoreId(java.lang.Integer aStoreId)
          Set the store Id for retrieving those order of that store.
 void setStoreId(java.lang.Integer[] aStoreIdList)
          Set the store Id for retrieving those order of that store.
 void setUserId(java.lang.Long aUserId)
          Set the user Id for retrieving those order of that user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail
public static final java.lang.String COPYRIGHT
The internal copyright field.
See Also:
Constant Field Values
Constructor Detail

OrderListDataBean

public OrderListDataBean()
OrderListDataBean constructor comment.
Method Detail

getCommandContext

public CommandContext getCommandContext()
Get the command context.
Returns:
the com.ibm.commerce.command.CommandContext.

getOrders

public java.util.Vector getOrders()
Get the list of order access beans.
Returns:
the Vector containing the order access beans.

getNumberOfOrders

public int getNumberOfOrders()
Get the number of orders
Returns:
the int

getOrderDataBeans

public OrderDataBean[] getOrderDataBeans()
Get the list of order data beans.
Returns:
the OrderDataBean[] containing the order data beans.

getOrderDataBeans

public OrderDataBean[] getOrderDataBeans(int startIndex,
                                         int endIndex)
Returns a view of the portion of the list of orders between the specified startIndex, inclusive, and endIndex, exclusive.
Parameters:
startIndex - start index
endIndex - end index
Returns:
the OrderDataBean[] containing the order data beans.

setPageSize

public void setPageSize(int aPageSize)
Specify the page size for getOrderDataBeansByPageNumber(int pageNumber) Default value is 20
Parameters:
aPageSize - page size, default is 20

getOrderDataBeansByPageNumber

public OrderDataBean[] getOrderDataBeansByPageNumber(int page)
Returns a list of order databeans by the page number Note: page number starts from 1
Parameters:
page - page number
Returns:
OrderDataBean array

getOrderListDataBeanSortByDisplayName

public OrderListDataBean[] getOrderListDataBeanSortByDisplayName()
Returns Vector of orderlist databeans grouped by distributor display name Side Effect: SortMethodId will be set to 6, and the orders will be sorted by display name

getOrderStatus

public java.lang.String getOrderStatus()
Get the status of the order.
Returns:
the String representing the order status.

getOrderStatusList

public java.lang.String[] getOrderStatusList()
Get the list of order status
Returns:
the String[] representing the list of order status.

getOwner

public java.lang.Long getOwner()
                        throws java.lang.Exception,
                               java.rmi.RemoteException,
                               javax.ejb.FinderException,
                               javax.naming.NamingException
Get owner
Returns:
java.lang.Long
Throws:
java.lang.Exception
java.rmi.RemoteException
javax.ejb.FinderException
javax.naming.NamingException

getRequestProperties

public TypedProperty getRequestProperties()
Get the request properties.
Returns:
the com.ibm.commerce.datatype.TypedProperty containing the request properties.

populate

public void populate()
              throws java.lang.Exception
Provides a list of Order AccessBean for those orders that are of the specified status and/or the specified stores.
Throws:
java.lang.Exception

setCommandContext

public void setCommandContext(CommandContext acommandContext)
Set the command context.

setOrderStatus

public void setOrderStatus(java.lang.String aStatus)
Set the status for retrieving those order of that status.
Parameters:
aStatus - the order status.

setOrderStatus

public void setOrderStatus(java.lang.String[] aStatusList)
Set the list of status for retrieving those order.
Parameters:
aStatusList - list of order status.

setRequestProperties

public void setRequestProperties(TypedProperty aParam)
Set the request properties.

setStoreId

public void setStoreId(java.lang.Integer aStoreId)
Set the store Id for retrieving those order of that store.
Parameters:
aStoreId - the order Id.

getStoreId

public java.lang.Integer getStoreId()
Returns store Id
Returns:
store ID

setStoreId

public void setStoreId(java.lang.Integer[] aStoreIdList)
Set the store Id for retrieving those order of that store.

setUserId

public void setUserId(java.lang.Long aUserId)
Set the user Id for retrieving those order of that user.
Parameters:
aUserId - the user Id.

fulfills

public boolean fulfills(java.lang.Long member,
                        java.lang.String relationship)
                 throws java.rmi.RemoteException,
                        java.lang.Exception,
                        javax.ejb.FinderException,
                        javax.naming.NamingException
Access control - fulfills
Returns:
boolean
Throws:
java.rmi.RemoteException
java.lang.Exception
javax.ejb.FinderException
javax.naming.NamingException

getChannelStoreOrderStatus

public java.lang.String getChannelStoreOrderStatus()
Gets the ChannelStoreOrderStatus a = not transferred b = partly transferred c = fully transferred d = processed
Returns:
Returns a String

setChannelStoreOrderStatus

public void setChannelStoreOrderStatus(java.lang.String istrChannelStoreOrderStatus)
Sets the ChannelStoreOrderStatus a = not transferred b = partly transferred c = fully transferred d = processed
Parameters:
istrChannelStoreOrderStatus - The istrChannelStoreOrderStatus to set

getChannelStoreOrderStatusList

public java.lang.String[] getChannelStoreOrderStatusList()
Gets the ChannelStoreOrderStatus a = not transferred b = partly transferred c = fully transferred d = processed
Returns:
Returns a String

setChannelStoreOrderStatus

public void setChannelStoreOrderStatus(java.lang.String[] astrChannelStoreOrderStatusList)
Sets the ChannelStoreOrderStatus a = not transferred b = partly transferred c = fully transferred d = processed
Parameters:
astrChannelStoreOrderStatusList - The astrChannelStoreOrderStatusList to set

getChannelStoreId

public java.lang.Integer getChannelStoreId()
Gets the ChannelStoreId
Returns:
Returns a Integer

setChannelStoreId

public void setChannelStoreId(java.lang.Integer inChannelStoreId)
Sets the ChannelStoreId
Parameters:
inChannelStoreId - The inChannelStoreId to set

getRelType

public java.lang.String getRelType()
Gets the relType
Returns:
Returns a String

setRelType

public void setRelType(java.lang.String istrRelType)
Sets the relType

getSortMethodId

public int getSortMethodId()
Gets the inSortMethodId
Returns:
Returns a int

setSortMethodId

public void setSortMethodId(int inSortMethodId)
Sets the inSortMethodId
Parameters:
inSortMethodId - The inSortMethodId to set

setAscendingSortOrder

public void setAscendingSortOrder()
Sets ascending sort order

setDescendingSortOrder

public void setDescendingSortOrder()
Sets ascending sort order

setFetchCurrentPendingOrder

public void setFetchCurrentPendingOrder(boolean trueFalse)
Specify whether the databean should be populated with current pending orders with this method

setStartEndDateAndScopeMethod

public void setStartEndDateAndScopeMethod(java.sql.Timestamp argStartDate,
                                          java.sql.Timestamp argEndDate,
                                          int argScopeMethod)
Specify the start and end date to be used to limit the scope of Orders retrieval Scope Method 1: start and end date will be compared with the lastupdate field Scope Method 2: start and end date will be compare with the timeplaced field Scope Method 3: start and end date will be compared with the timeplaced field, if timeplcaed is null, lastupdate will be used instead.
Parameters:
argStartDate - start date
argEndDate - end date
argScopeMethod - scope method id

setMaxRows

public void setMaxRows(int aMaxRows)
Specify the maximum number of rows to be returned Default value is 400 rows
Parameters:
aMaxRows - maximum number of rows to be returned

isFilterOrdersWithNoDescription

public boolean isFilterOrdersWithNoDescription()
Returns the filterOrdersWithNoDescription.
Returns:
boolean

setFilterOrdersWithNoDescription

public void setFilterOrdersWithNoDescription(boolean filterOrdersWithNoDescription)
Sets the filterOrdersWithNoDescription. This flag will determine whether orders without description will be filtered out when the OrderListDataBean is used in mode a (not transferred) or b (partly transferred).
Parameters:
filterOrdersWithNoDescription - The filterOrdersWithNoDescription to set