com.ibm.commerce.order.beans

Class OrderHistoryDataBean

    • Field Detail

      • COPYRIGHT

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

      • OrderHistoryDataBean

        public OrderHistoryDataBean()
        This is the default constructor for OrderHistoryDataBean.
      • OrderHistoryDataBean

        public OrderHistoryDataBean(OrderHistoryAccessBean argabOrderHistory)
        This is the constructor for OrderHistoryDataBean. It constructs an OrderHistoryDataBean from an OrderHistoryAccessBean by extracting the OrderHistory EJB reference from the OrderHistoryAccessBean. Note: Consider using OrderHistoryDataBean(OrderHistoryAccessBean argabOrderHistory, CommandContext aCommandContext) if commandContext is available.
        Parameters:
        argabOrderHistory - OrderHistoryAccessBean
        Throws:
        java.lang.Exception
      • OrderHistoryDataBean

        public OrderHistoryDataBean(OrderHistoryAccessBean argabOrderHistory,
                                    CommandContext aCommandContext)
        This is the constructor for OrderHistoryDataBean. It constructs an OrderHistoryDataBean from an OrderHistoryAccessBean by extracting the OrderHistoryDataBean EJB reference from the OrderHistoryDataBean and setting the commandContext
        Parameters:
        argabOrderHistory - OrderHistoryDataBean
        aCommandContext - CommandContext
        Throws:
        java.lang.Exception
    • Method Detail

      • getCommandContext

        public CommandContext getCommandContext()
        This method gets the command context for this bean.
        Specified by:
        getCommandContext in interface SmartDataBean
        Returns:
        This method returns the command context.
        See Also:
        com.ibm.commerce.beans.SmartDataBean#getCommandContext()
      • populate

        public void populate()
        This method is used to populate the OrderHistoryDataBean. You must set the following parameters before running the populate() method.
      • OrderVersion
      • OrderId
Specified by:
populate in interface SmartDataBean
Throws:
java.lang.Exception
See Also:
com.ibm.commerce.beans.SmartDataBean#populate(), setOrderId(String), setOrderVersion(String)
  • setCommandContext

    public void setCommandContext(CommandContext argCommandContext)
    This method sets the command context for this bean.
    Specified by:
    setCommandContext in interface SmartDataBean
    Parameters:
    argCommandContext - the command context.
    See Also:
    com.ibm.commerce.beans.SmartDataBean#setCommandContext(com.ibm.commerce.command.CommandContext)
  • getRequestProperties

    public TypedProperty getRequestProperties()
    This method gets the request properties.
    Specified by:
    getRequestProperties in interface InputDataBean
    Returns:
    The request properties.
    See Also:
    com.ibm.commerce.beans.InputDataBean#getRequestProperties()
  • setRequestProperties

    public void setRequestProperties(TypedProperty param)
    This method sets the request properties.
    Specified by:
    setRequestProperties in interface InputDataBean
    Parameters:
    param - the request properties.
    See Also:
    com.ibm.commerce.beans.InputDataBean#setRequestProperties(com.ibm.commerce.datatype.TypedProperty)
  • setOrderVersion

    public void setOrderVersion(java.lang.String argOrderVersion)
    This method sets the order history key field for this bean.
    Specified by:
    setOrderVersion in interface OrderHistoryInputDataBean
    Parameters:
    argOrderVersion - the order version.
    See Also:
    com.ibm.commerce.order.beans.OrderHistoryInputDataBean#setOrderVersion(java.lang.String)
  • setIsOrderCommentFetched

    public void setIsOrderCommentFetched(boolean isFetchedAgain)
    This method sets the isOrderCommentFetched field for this bean
    Parameters:
    isFetchedAgain - This parameter is true if the order comment is fetched; false otherwise.
  • getOrderComments

    public OrderCommentDataBean[] getOrderComments()
    This method gets the comments for this order history.
    Specified by:
    getOrderComments in interface OrderHistorySmartDataBean
    Returns:
    the OrderCommentDataBean[] containing the OrderComment data beans.
    See Also:
    com.ibm.commerce.order.beans.OrderHistorySmartDataBean#getOrderComments()
  • getHistoryOrder

    public HistoryOrder getHistoryOrder()
    This method gets the HistoryOrder.
    Returns:
    the history order object.
  • setPageSize

    public void setPageSize(int aPageSize)
    This method specifies the page size for getOrderCommentDataBeansByPageNumber(int pageNumber). Default value is 20.
    Parameters:
    aPageSize - page size, default is 20.
  • setCurrentPage

    public void setCurrentPage(int pageNumber)
    This method sets the current page number.
    Parameters:
    pageNumber - The page number to set.
  • setMaxRows

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

    public void setAscendingSortOrder()
    This method sets ascending sort order.
  • setDescendingSortOrder

    public void setDescendingSortOrder()
    This method sets ascending sort order.
  • getSortMethodId

    public int getSortMethodId()
    This method returns the inSortMethodId.
    Returns:
    Returns an int
  • setSortMethodId

    public void setSortMethodId(int argSortMethodId)
    This method sets the inSortMethodId. If OrderByField is set, use the OrderByField for the query; else use the sort method.
    Parameters:
    argSortMethodId - The inSortMethodId to set, 0 - by comments ID , 1 - by last update.
  • getOrderCommentDataBeansByPageNumber

    public OrderCommentDataBean[] getOrderCommentDataBeansByPageNumber(int page)
    This method returns a list of orderComment databeans by the page number. Note: page number starts from 1.
    Parameters:
    page - page number
    Returns:
    the OrderCommentDataBean[] containing the OrderComment data beans.
    Throws:
    java.lang.Exception
  • getOrderCommentDataBeansByPageNumber

    public OrderCommentDataBean[] getOrderCommentDataBeansByPageNumber()
    This method returns a list of orderComment databeans by the page number set in currentPage. Note: page number starts from 1.
    Returns:
    the OrderCommentDataBean[] containing the OrderComment data beans.
    Throws:
    java.lang.Exception
  • getOrderCommentDataBeans

    public OrderCommentDataBean[] getOrderCommentDataBeans(int startIndex,
                                                           int endIndex)
    This method returns a view of the portion of the list of orderComments between the specified startIndex, inclusive, and endIndex, exclusive.
    Parameters:
    startIndex - start index.
    endIndex - end index.
    Returns:
    the OrderCommentDataBean[] containing the OrderComment data beans.
    Throws:
    java.lang.Exception
  • setOrderByField

    public void setOrderByField(java.lang.String argOrderBy)
    This method sets the order by field.
    Parameters:
    argOrderBy - the order by field.
  • getOrderByField

    public java.lang.String getOrderByField()
    This method gets the order by field.
    Returns:
    strOrderBy the order by field.
  • getResultSetSize

    public int getResultSetSize()
    This method gets the size of the result set.
    Returns:
    The size of the retrieved order list.
  • setResultSetSize

    public void setResultSetSize(int newResultSetSize)
    This method sets the list size of the orders found.
    Parameters:
    newResultSetSize - The size of the order list.