com.ibm.commerce.order.beans

Class OrderDataBean

    • Field Detail

      • COPYRIGHT

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

        public static final java.lang.String EC_DEEP_FETCH
        deep fetch boolean
        See Also:
        Constant Field Values
    • Constructor Detail

      • OrderDataBean

        public OrderDataBean()
        OrderDataBean constructor comment.
      • OrderDataBean

        public OrderDataBean(OrderAccessBean aabOrder,
                             CommandContext aCommandContext)
        Constructs an OrderDataBean from an OrderAccessBean by extracting the Order Entity reference from the OrderAccessBean and setting the commandContext
        Parameters:
        aabOrder - OrderAccessBean
        aCommandContext - Command Context
        Throws:
        java.lang.Exception
      • OrderDataBean

        public OrderDataBean(OrderAccessBean aabOrder)
        Constructs an OrderDataBean from an OrderAccessBean by extracting the Order Entity reference from the OrderAccessBean. Note: Consider using OrderDataBean(OrderAccessBean aabOrder,CommandContext aCommandContext) if commandContext is available.
        Parameters:
        aabOrder - OrderAccessBean
        Throws:
        java.lang.Exception
    • Method Detail

      • getTransactionCachedOrderDataBean

        public static final OrderDataBean getTransactionCachedOrderDataBean(OrderAccessBean aOrderAB,
                                                                            CommandContext aCommandContext)
        Returns an OrderDataBean from the transaction cache, or, if it is not there, then creates a new OrderDataBean, sets the deepFetch property to false, and places it in the transaction cache. As the returned bean is in the transaction cache, and may be used by other callers, the caller should not call any setters on the returned bean.
        Parameters:
        aOrderAB - the order for the data bean.
        aCommandContext - the command context for the data bean. If this is null, then the transaction cache is not used.
        Returns:
        the order data bean for the specified order and command context.
        Throws:
        java.lang.Exception
      • getTransactionCachedOrderDataBean

        public static final OrderDataBean getTransactionCachedOrderDataBean(java.lang.String astrOrderId,
                                                                            CommandContext aCommandContext)
        Returns an OrderDataBean from the transaction cache, or, if it is not there, then creates a new OrderDataBean, sets the deepFetch property to false, and places it in the transaction cache. As the returned bean is in the transaction cache, and may be used by other callers, the caller should not call any setters on the returned bean.
        Parameters:
        astrOrderId - the order Id for the data bean.
        aCommandContext - the command context for the data bean. If this is null, then the transaction cache is not used.
        Returns:
        the order data bean for the specified order and command context
      • clearTransactionCachedOrderDataBeans

        public static final void clearTransactionCachedOrderDataBeans()
      • getFormattedTotalAdjustment

        public FormattedMonetaryAmountDataBean getFormattedTotalAdjustment()
                                                                    throws ECSystemException
        This method returns the total adjustment of the order in FormattedMonetaryAmountDataBean. the total adjustment is the summary of all the adjustment applied on the order. including discount, coupon, surcharge and shipping adjustment.
        Specified by:
        getFormattedTotalAdjustment in interface com.ibm.commerce.order.beans.OrderSmartDataBean
        Returns:
        FormattedMonetaryAmountDataBean
        Throws:
        ECSystemException
      • getFormattedTotalProductPrice

        public FormattedMonetaryAmountDataBean getFormattedTotalProductPrice()
                                                                      throws ECSystemException
        This method returns the total price in FormattedMonetaryAmountDataBean.
        Specified by:
        getFormattedTotalProductPrice in interface com.ibm.commerce.order.beans.OrderSmartDataBean
        Returns:
        FormattedMonetaryAmountDataBean
        Throws:
        ECSystemException
      • getFormattedTotalShippingCharge

        public FormattedMonetaryAmountDataBean getFormattedTotalShippingCharge()
                                                                        throws ECSystemException
        This method returns the total shipping charge of the order in FormattedMonetaryAmountDataBean. the total shipping charge is the sum of the base shipping charge and the total shipping adjustment.
        Specified by:
        getFormattedTotalShippingCharge in interface com.ibm.commerce.order.beans.OrderSmartDataBean
        Returns:
        FormattedMonetaryAmountDataBean
        Throws:
        ECSystemException
        See Also:
        getShippingChargeTotal()
      • getFormattedTotalShippingTax

        public FormattedMonetaryAmountDataBean getFormattedTotalShippingTax()
                                                                     throws ECSystemException
        This method returns the total shipping tax in FormattedMonetaryAmountDataBean.
        Specified by:
        getFormattedTotalShippingTax in interface com.ibm.commerce.order.beans.OrderSmartDataBean
        Returns:
        FormattedMonetaryAmountDataBean
        Throws:
        ECSystemException
      • getFormattedTotalTax

        public FormattedMonetaryAmountDataBean getFormattedTotalTax()
                                                             throws ECSystemException
        This method returns the total tax in FormattedMonetaryAmountDataBean.
        Specified by:
        getFormattedTotalTax in interface com.ibm.commerce.order.beans.OrderSmartDataBean
        Returns:
        FormattedMonetaryAmountDataBean
        Throws:
        ECSystemException
      • getFormattedEstimatedShipDate

        public java.lang.String getFormattedEstimatedShipDate()
        This method returns formatted EstimatedShipDate.
        Returns:
        String
      • getFormattedActualShipDate

        public java.lang.String getFormattedActualShipDate()
        This method returns formatted ActualShipDate.
        Returns:
        String
      • getFormattedOrderPlacedTime

        public java.lang.String getFormattedOrderPlacedTime()
        This method returns formatted Order Placed Time.
        Returns:
        String
      • getFormattedLastUpdateTime

        public java.lang.String getFormattedLastUpdateTime()
        This method returns formatted Order Last Update Time.
        Returns:
        String
      • getGrandTotal

        public PriceDataBean getGrandTotal()
        This method returns the grand total price in PriceDataBean.
        Specified by:
        getGrandTotal in interface com.ibm.commerce.order.beans.OrderSmartDataBean
        Returns:
        String
      • getTotalOrderItemsPrice

        public java.lang.String getTotalOrderItemsPrice()
        This method returns the grand total price.
        Returns:
        String
      • getOrderId

        public java.lang.String getOrderId()
        This method returns the order id.
        Specified by:
        getOrderId in interface com.ibm.commerce.order.beans.OrderSmartDataBean
        Overrides:
        getOrderId in class OrderAccessBean
        Returns:
        String
      • isEmpty

        public boolean isEmpty()
        Does this order have any order items.
        Returns:
        boolean
      • getBillingAddressDataBean

        public AddressDataBean getBillingAddressDataBean()
        This method returns billing address.
        Returns:
        AddressDataBean
      • getOrderItemDataBeans

        public OrderItemDataBean[] getOrderItemDataBeans()
        This method returns all OrderItemDataBeans in this order.
        Specified by:
        getOrderItemDataBeans in interface com.ibm.commerce.order.beans.OrderSmartDataBean
        Returns:
        OrderItemDataBean array
      • getShippedOrderItemDataBeans

        public OrderItemDataBean[] getShippedOrderItemDataBeans()
        This method returns all shipped OrderItemDataBeans in this order.
        Returns:
        OrderItemDataBean array
      • getNumberOfOrderItems

        public int getNumberOfOrderItems()
        This method returns number of order items in this order.
        Returns:
        int
      • getNumberOfShippedOrderItems

        public int getNumberOfShippedOrderItems()
        This method returns number of shipped order items in this order.
        Returns:
        int
      • getOrderItems

        public OrderItemAccessBean[] getOrderItems()
        This method returns all OrderItemAccessBean in this order.
        Specified by:
        getOrderItems in interface com.ibm.commerce.order.beans.OrderSmartDataBean
        Overrides:
        getOrderItems in class OrderAccessBean
        Returns:
        OrderItemAccessBean
      • getPurchaseOrderNumber

        public java.lang.String getPurchaseOrderNumber()
        This method returns the Buyer Purchase Order Number associated with this order.
        Specified by:
        getPurchaseOrderNumber in interface com.ibm.commerce.order.beans.OrderSmartDataBean
        Returns:
        String
      • getRequestProperties

        public TypedProperty getRequestProperties()
        This method returns the request property set within this bean.
        Specified by:
        getRequestProperties in interface InputDataBean
        Returns:
        com.ibm.commerce.datatype.TypedProperty
      • getSubOrders

        public SubOrderAccessBean[] getSubOrders()
        This method returns all SubOrderAccessBean in this order.
        Specified by:
        getSubOrders in interface com.ibm.commerce.order.beans.OrderSmartDataBean
        Overrides:
        getSubOrders in class OrderAccessBean
        Returns:
        SubOrderAccessBean array
      • getSubTotal

        public PriceDataBean getSubTotal()
        This method returns the sub total.
        Specified by:
        getSubTotal in interface com.ibm.commerce.order.beans.OrderSmartDataBean
        Returns:
        PriceDataBean
      • getTaxes

        public CategorizedMonetaryAmountsDataBean getTaxes()
                                                    throws ECSystemException
        This method returns the tax amounts for each of the tax categories that have been computed for the order.
        Specified by:
        getTaxes in interface com.ibm.commerce.order.beans.OrderSmartDataBean
        Returns:
        the CategorizedMonetaryAmountsDataBean containing the taxing monetary amounts, names and descriptions and so forth.
        Throws:
        ECSystemException
      • getTotalProductPriceBySumUp

        public java.math.BigDecimal getTotalProductPriceBySumUp()
        This method returns the total price in FormattedMonetaryAmountDataBean.
        Returns:
        BigDecimal
        Throws:
        ECSystemException
      • isDeepFetch

        public boolean isDeepFetch()
        This method returns if deep fetched is used.
        Returns:
        boolean
      • populate

        public void populate()
                      throws java.lang.Exception
        This method is used to populate the OrderDataBean. You must set OrderId using the setOrderId method before running the populate() method.
        Specified by:
        populate in interface SmartDataBean
        Throws:
        java.lang.Exception
        See Also:
        setOrderId(String)
      • setCommandContext

        public void setCommandContext(CommandContext context)
        This method setsCommandContext method comment.
        Specified by:
        setCommandContext in interface SmartDataBean
        Parameters:
        context - CommandContext
      • setDeepFetch

        public void setDeepFetch(boolean abDeepFetch)
        To use deep fetch or not
        Parameters:
        abDeepFetch - boolean true: use deep fetch, false: not use deep fetch.
      • setOrderId

        public void setOrderId(java.lang.String anOrderId)
        This method sets an order id.
        Specified by:
        setOrderId in interface OrderInputDataBean
        Parameters:
        anOrderId - order id
      • setOrderItems

        public void setOrderItems(OrderItemDataBean[] adbOrderItems)
        This method sets order items.
        Parameters:
        adbOrderItems - OrderItemDataBean array
      • setRequestProperties

        public void setRequestProperties(TypedProperty aRequestProperties)
        This method sets the request properties within this bean.
        Specified by:
        setRequestProperties in interface InputDataBean
        Parameters:
        aRequestProperties - com.ibm.commerce.datatype.TypedProperty
      • setSecurityCheck

        public void setSecurityCheck(boolean check)
        Turn security check on or off.
        Specified by:
        setSecurityCheck in interface OrderInputDataBean
        Parameters:
        check - boolean
      • fulfills

        public boolean fulfills(java.lang.Long member,
                                java.lang.String relationship)
                         throws java.lang.Exception
        Used by access control
        Specified by:
        fulfills in interface Protectable
        Overrides:
        fulfills in class OrderAccessBean
        Parameters:
        member - Long
        relationship - String
        Returns:
        boolean
        Throws:
        RemoteException
        java.lang.Exception
      • getChildOrders

        public OrderDataBean[] getChildOrders(java.lang.Integer[] aDistributorStoreIds,
                                              java.lang.String aRelType)
        This method returns child order for a list of distributors by and RelType.
        Parameters:
        aDistributorStoreIds - Integer array
        aRelType - String order quotation relation type
        Returns:
        OrderDataBean array
      • getParentOrder

        public OrderDataBean getParentOrder()
        This method returns parent order according to the ORDQUOTREL table.
        Returns:
        OrderDataBean
      • isAtLeastOneAvailabilityUnknown

        public boolean isAtLeastOneAvailabilityUnknown()
        This method returns true if one of the orderItems has a null AvailableQuantity, or else returns false if all orderItems have AvailableQuantity.
        Returns:
        boolean
      • isAllItemsAvailable

        public boolean isAllItemsAvailable()
        This method returns true if all orderItems have AvailableQuantity that is >0, or else returns false.
        Returns:
        boolean
      • isAllItemsBackOrdered

        public boolean isAllItemsBackOrdered()
        This method returns true if all orderItems are backordered, or else returns false.
        Returns:
        boolean
      • isShipped

        public boolean isShipped()
        This method returns true if all OrderItems have been manifested.
        Returns:
        boolean
      • isMixed

        public boolean isMixed()
        Checks to see if some items are available and some are back ordered.
        Returns:
        boolean
      • getOrderFulfillmentStatusDataBean

        public OrderFulfillmentStatusDataBean getOrderFulfillmentStatusDataBean()
        This method returns OrderStatusDataBean for this order.
        Returns:
        OrderFulfillmentStatusDataBean
      • getChildSelectionOrders

        public OrderDataBean[] getChildSelectionOrders()
        This method returns selection child order.
        Returns:
        OrderDataBean array
      • getChildInitialOrders

        public OrderDataBean[] getChildInitialOrders()
        This method returns initial child order.
        Returns:
        OrderDataBean array
      • getChildFinalOrders

        public OrderDataBean[] getChildFinalOrders()
        This method returns final child order.
        Returns:
        OrderDataBean array
      • getChildSubmissionOrders

        public OrderDataBean[] getChildSubmissionOrders()
        This method returns submission child order.
        Returns:
        OrderDataBean array
      • getSiblingSelectionOrders

        public OrderDataBean[] getSiblingSelectionOrders()
        This method returns sibling selection orders.
        Returns:
        OrderDataBean array
      • getSiblingInitialOrders

        public OrderDataBean[] getSiblingInitialOrders()
        This method returns sibling initial orders.
        Returns:
        OrderDataBean array
      • getSiblingSubmissionOrders

        public OrderDataBean[] getSiblingSubmissionOrders()
        This method returns sibling submission orders.
        Returns:
        OrderDataBean array
      • getSiblingFinalOrders

        public OrderDataBean[] getSiblingFinalOrders()
        This method returns sibling final orders.
        Returns:
        OrderDataBean array
      • getDistributorName

        public java.lang.String getDistributorName()
        This method returns the name of the distributor that the order belongs.
        Returns:
        String
      • getOrderAdjustmentDataBeans

        public OrderAdjustmentDataBean[] getOrderAdjustmentDataBeans()
        This method returns the OrderAdjustments of this Order.
        Returns:
        the OrderAdjustmentDataBeans, or null if none is found or an error has occurred during its retrieval.
      • getOrderAdjustmentDataBeans

        public OrderAdjustmentDataBean[] getOrderAdjustmentDataBeans(java.lang.Integer anCalculationUsageId,
                                                                     java.lang.Integer anDisplayLevel)
        This method returns the OrderAdjustments of this Order, with the specified CalculationUsage and display level.
        Parameters:
        anCalculationUsageId - the CalculationUsage ID. Null means any CalculationUsage.
        anDisplayLevel - the display level. Null means any display level.
        Returns:
        the OrderAdjustmentDataBeans, or null if none is found or an error has occurred during its retrieval.
      • getAdjustmentTotal

        public java.math.BigDecimal getAdjustmentTotal(java.lang.Integer anCalculationUsageId,
                                                       java.lang.Integer anDisplayLevel)
        This method returns the adjustment total of this Order, with the specified CalculationUsage and display level.
        Parameters:
        anCalculationUsageId - the CalculationUsage ID. Null means any CalculationUsage.
        anDisplayLevel - the display level. Null means any display level. Alternative: use
        See Also:
        getTotalAdjustmentByDisplayLevel(Integer anDisplayLevel) or, getTotalAdjustmentByCalculationUsageId(Integer anCalculationUsageId) or, getTotalAdjustmentByCalculationUsageIdAndDisplayLevel(Integer anCalculationUsageId, Integer anDisplayLevel) instead.
      • getTotalAdjustmentByDisplayLevel

        public java.math.BigDecimal getTotalAdjustmentByDisplayLevel(java.lang.Integer anDisplayLevel)
        This method returns the adjustment total of this Order, with the specified display level.
        Overrides:
        getTotalAdjustmentByDisplayLevel in class OrderAccessBean
        Parameters:
        anDisplayLevel - the display level.
        Returns:
        the adjustment total, or null if an error has occurred.
      • getTotalAdjustmentByCalculationUsageId

        public java.math.BigDecimal getTotalAdjustmentByCalculationUsageId(java.lang.Integer anCalculationUsageId)
        This method returns the adjustment total of this Order, with the specified CalculationUsage.
        Overrides:
        getTotalAdjustmentByCalculationUsageId in class OrderAccessBean
        Parameters:
        anCalculationUsageId - the CalculationUsage ID.
        Returns:
        the adjustment total, or null if an error has occurred.
      • getTotalAdjustmentByCalculationUsageIdAndDisplayLevel

        public java.math.BigDecimal getTotalAdjustmentByCalculationUsageIdAndDisplayLevel(java.lang.Integer anCalculationUsageId,
                                                                                          java.lang.Integer anDisplayLevel)
        This method returns the adjustment total of this Order, with the specified CalculationUsage and display level.
        Overrides:
        getTotalAdjustmentByCalculationUsageIdAndDisplayLevel in class OrderAccessBean
        Parameters:
        anCalculationUsageId - the CalculationUsage ID.
        anDisplayLevel - the display level.
        Returns:
        the adjustment total, or null if an error has occurred.
      • getFormattedOrderItemDiscountTotal

        public FormattedMonetaryAmountDataBean getFormattedOrderItemDiscountTotal()
        This method returns the formatted orderitem discount total of this Order.
        Returns:
        the formatted orderitem discount total, or null if an error has occurred.
      • getFormattedDiscountAdjustedProductTotal

        public FormattedMonetaryAmountDataBean getFormattedDiscountAdjustedProductTotal()
        This method returns the formatted discount adjusted product total of this Order.
        Returns:
        the discount adjusted product total, or null if an error has occurred.
        See Also:
        getDiscountAdjustedProductTotal()
      • getShippingAdjustmentTotal

        public java.math.BigDecimal getShippingAdjustmentTotal()
        This method returns the shipping adjustment total of this Order, with CalculationUsage -7 (that is shipping adjustment). the total shipping adjustment is the summary of all the shipping charge adjustment of the order. such as CSR given shipping adjustment, shipping promotion, TSR driven shipping adjustment, and contract defined shipping adjustment. Equivalent to This method returnsTotalAdjustmentByCalculationUsageId(new Integer(-7)).
        Returns:
        the adjustment total, or null if an error has occurred.
      • getFormattedTotalShippingAdjustment

        public FormattedMonetaryAmountDataBean getFormattedTotalShippingAdjustment()
        This method returns the formatted shipping adjustment total of this Order, with CalculationUsage -7 (that is shipping adjustment).
        Returns:
        the shipping adjustment total, or null if an error has occurred.
        See Also:
        getShippingAdjustmentTotal()
      • getFormattedCouponAdjustmentTotal

        public FormattedMonetaryAmountDataBean getFormattedCouponAdjustmentTotal()
        This method returns the formatted adjustment total of this Order, with CalculationUsage -5 (that is coupon).
        Returns:
        the adjustment total, or null if an error has occurred.
        See Also:
        getCouponAdjustmentTotal()
      • isRFQOrder

        public boolean isRFQOrder()
        Determine if this is an RFQ Order.
        Returns:
        true if RFQ order, false otherwise
      • getUniqueShippingAddresses

        public AddressDataBean[] getUniqueShippingAddresses()
        Retrieve an array of unique shipping addresses from items contained in order.
        Returns:
        AddressDataBean[] array of unique shipping addresses in this order
      • isPurchaseOrderNumberRequired

        public boolean isPurchaseOrderNumberRequired()
        This method returns true if any of the order items in this order require a purchase order as described in its contract.
        Returns:
        boolean
      • matchOrderItemStatus

        public boolean matchOrderItemStatus(java.lang.String code)
        This method is used to find a matching status in the orderitems table.
        Parameters:
        code - as String
        Returns:
        boolean for true if ever found.
      • matchOrderItemStatus

        public boolean matchOrderItemStatus(java.lang.String[] codes)
        This method is used to find a matching status in the orderitems table.
        Parameters:
        codes - as String[]
        Returns:
        boolean for true if ever found.
      • isDiscount

        public boolean isDiscount()
        This method returns true if there is a discount on this order.
        Returns:
        boolean
      • isSurcharge

        public boolean isSurcharge()
        This method returns true if there is a surcharge on this order.
        Returns:
        boolean
      • getUsableShipChargesAndAccountByShipModeDataBean

        public ShipChargesByShipMode[] getUsableShipChargesAndAccountByShipModeDataBean()
        This method returns all usable shipping charges and account by ship mode for this order.
        Returns:
        ShipChargesByShipMode[] An array of ShipChargesByShipMode objects
      • getShipInstructsListDataBean

        public ShipInstructionsDataBean[] getShipInstructsListDataBean()
        This method returns all the shipping instructions for the order.
        Returns:
        ShipInstructionsDataBean [] An array of ShipInstructionsDataBean objects
      • getShipCarrierAccntListDataBean

        public ShipCarrAccntDataBean[] getShipCarrierAccntListDataBean()
        This method returns all the shipping carrier account data for the order.
        Returns:
        ShipCarrAccntDataBean [] An array of ShipCarrAccntDataBean objects
      • getOrderReleases

        public OrderReleaseDataBean[] getOrderReleases()
        This method returns the orderReleaseDateBeans with status "NEW".
        Returns:
        OrderReleaseDataBeans
      • getCurrentAdjustmentTotal

        public java.math.BigDecimal getCurrentAdjustmentTotal()
        It returns the adjustment total for what will ship now when the order is submitted. This method returns the CurrentAdjustmentTotal
        Returns:
        CurrentAdjustment
      • getCurrentAdjustmentTotalByCalculationUsageId

        public java.math.BigDecimal getCurrentAdjustmentTotalByCalculationUsageId(java.lang.Integer calculationUsageId)
        It returns the adjustment total of specific calculation usage for what will ship now when the order is submitted. This method returns the CurrentAdjustmentTotal
        Parameters:
        calculationUsageId -
        Returns:
        CurrentAdjustment
      • getCurrentDiscountAdjustmentTotal

        public java.math.BigDecimal getCurrentDiscountAdjustmentTotal()
        It returns the adjustment total of discount calculation usage for what will ship now when the order is submitted. This method returns the getCurrentDiscountAdjustmentTotal
        Returns:
        CurrentDiscountAdjustmentTotal
      • getCurrentSurchargeAdjustmentTotal

        public java.math.BigDecimal getCurrentSurchargeAdjustmentTotal()
        It returns the adjustment total of surcharge calculation usage for what will ship now when the order is submitted. This method returns the getCurrentSurchargeAdjustmentTotal
        Returns:
        CurrentSurchargeAdjustmentTotal
      • getCurrentShippingAdjustmentTotal

        public java.math.BigDecimal getCurrentShippingAdjustmentTotal()
        It returns the adjustment total of shipping charge calculation usage for what will ship now when the order is submitted. This method returns the CurrentShippingAdjustmentTotal
        Returns:
        CurrentShippingAdjustmentTotal
      • getFormattedCurrentDiscountAdjustmentTotal

        public FormattedMonetaryAmountDataBean getFormattedCurrentDiscountAdjustmentTotal()
        This method returns the formatted CurrentDiscountAdjustmentTotal. It returns the discount adjustment total for what will ship now when the order is submitted.
        Returns:
        FormattedMonetaryAmountDataBean
      • getFormattedCurrentSurchargeAdjustmentTotal

        public FormattedMonetaryAmountDataBean getFormattedCurrentSurchargeAdjustmentTotal()
        This method returns the formatted CurrentSurchargeAdjustmentTotal. It returns the surcharge adjustment total for what will ship now when the order is submitted.
        Returns:
        FormattedMonetaryAmountDataBean
      • getFormattedCurrentShippingAdjustmentTotal

        public FormattedMonetaryAmountDataBean getFormattedCurrentShippingAdjustmentTotal()
        This method returns the formatted CurrentShippingAdjustmentTotal. It returns the shipping adjustment total for what will ship now when the order is submitted.
        Returns:
        FormattedMonetaryAmountDataBean
      • getCurrentTaxTotal

        public java.math.BigDecimal getCurrentTaxTotal()
        It returns the tax total for what will ship now when the order is submitted. This method returns the CurrentTaxTotal.
        Returns:
        CurrentTax
      • getCurrentShippingCharge

        public java.math.BigDecimal getCurrentShippingCharge()
        It returns the base shipping charge for what will ship now when the order is submitted. This method returns the CurrentBaseShippingCharge
        Returns:
        CurrentBaseShippingCharge
      • getCurrentTotalShippingCharge

        public java.math.BigDecimal getCurrentTotalShippingCharge()
        It returns the total shipping charge for what will ship now when the order is submitted. This method returns the CurrentTotalShippingCharge
        Returns:
        CurrentTotalShippingCharge
      • getCurrentProductTotal

        public java.math.BigDecimal getCurrentProductTotal()
        It returns the product total for what will ship now when the order is submitted. This method returns the CurrentProductTotal.
        Returns:
        CurrentProductCharge
      • getCurrentShippingTaxTotal

        public java.math.BigDecimal getCurrentShippingTaxTotal()
        It returns the shipping tax total for what will ship now when the order is submitted. This method returns the CurrentShippingTaxTotal
        Returns:
        CurrentShippingTax
      • getFormattedCurrentAdjustmentTotal

        public FormattedMonetaryAmountDataBean getFormattedCurrentAdjustmentTotal()
        This method returns the formatted CurrentAdjustmentTotal. It returns the adjustment total for what will ship now when the order is submitted.
        Returns:
        FormattedMonetaryAmountDataBean
      • getFormattedCurrentTaxTotal

        public FormattedMonetaryAmountDataBean getFormattedCurrentTaxTotal()
        This method returns the formatted CurrentTaxTotal. It returns the grand total for what will ship now when the order is submitted.
        Returns:
        FormattedMonetaryAmountDataBean
      • getFormattedCurrentTotalShippingCharge

        public FormattedMonetaryAmountDataBean getFormattedCurrentTotalShippingCharge()
        This method returns the formatted CurrentTotalShippingCharge. It returns the shipping charge total for what will ship now when the order is submitted.
        Returns:
        FormattedMonetaryAmountDataBean
      • getFormattedCurrentShippingCharge

        public FormattedMonetaryAmountDataBean getFormattedCurrentShippingCharge()
        This method returns the formatted CurrentShippingCharge. It returns the base shipping charge total for what will ship now when the order is submitted.
        Returns:
        FormattedMonetaryAmountDataBean
      • getFormattedCurrentProductTotal

        public FormattedMonetaryAmountDataBean getFormattedCurrentProductTotal()
        This method returns the formatted CurrentProductTotal. It returns the grand total for what will ship now when the order is submitted.
        Returns:
        FormattedMonetaryAmountDataBean
      • getFormattedCurrentShippingTaxTotal

        public FormattedMonetaryAmountDataBean getFormattedCurrentShippingTaxTotal()
        This method returns the formatted CurrentShippingTaxTotal. It returns the grand total for what will ship now when the order is submitted.
        Returns:
        FormattedMonetaryAmountDataBean
      • getCurrentTotal

        public java.math.BigDecimal getCurrentTotal()
        It returns the grand total for what will ship now when the order is submitted. This method returns the grand total price in PriceDataBean.
        Returns:
        String
      • getFormattedCurrentTotal

        public FormattedMonetaryAmountDataBean getFormattedCurrentTotal()
        This method returns the formatted Current Total Charge. It returns the grand total for what will ship now when the order is submitted.
        Returns:
        FormattedMonetaryAmountDataBean
      • isEditable

        public boolean isEditable()
        This method returns true if the order can be edited. This means that the order can be edited but the TSROrderEditBegin command still will have to be issued if that has not already been done. Orders that are closed or cancelled can not be edited.
        Returns:
        true if the order is capable of being edited, false otherwise.
      • checkLock

        public boolean checkLock()
        Check if the current CSR has locked the order.
        Returns:
        true if it is locked by the current CSR, otherwise return false;
      • getCheckLock

        public boolean getCheckLock()
        Check if the current CSR has locked the order.
        Returns:
        true if it is locked by the current CSR, otherwise return false;
      • getLockedByLogonId

        public java.lang.String getLockedByLogonId()
        This method returns the CSR logon id who locks the order. It will return null if the order is locked by a guest user or the order is not locked.
        Returns:
        the logon id
      • isLocked

        public boolean isLocked()
        Check if this order is locked by some other people.
        Returns:
        true if it is locked by other people or some errors in checking the lock, otherwise return false;
      • getOrderItemDiscountAdjustedProductTotal

        public FormattedMonetaryAmountDataBean getOrderItemDiscountAdjustedProductTotal()
        This method returns the subtotal after product discounts.
        Returns:
        the FormattedMonetaryAmountDataBean which contains the subtotal after product discounts
      • getPaymentInfo

        public java.util.HashMap getPaymentInfo()
        This method returns a HashMap that contains the payment information for the order from the ORDPAYINFO database table.
        Returns:
        a HashMap which contains payment information for the order. In the HashMap, the payment information is saved as a name-value pair both elements are of String type. For example, the name is "PaymentMethod" and the value is "VISA".
      • getCurrentAddressDataBean

        public AddressDataBean getCurrentAddressDataBean()
        This method returns an AddressDataBean that contains the current billing address for the nickname that the order was submitted under. This method will get the nickname for the for the address, then make sure that the address isn't a temporary one. If the address is temporary, then we find the permanent one with the same nickname for the same user.
        Returns:
        an AddressDataBean which contains the current billing address for the order
      • isEveryItemAvailableNow

        public boolean isEveryItemAvailableNow()
        This method returns true if every item in the shopping cart is available now. Inventory allocation must have be done prior to calling this method and all items allocated if possible. This method will return false if any item that has not been released to fulfillment is not allocated.
        Returns:
        boolean
      • getOrderItemsByFormattedShippingDate

        public java.util.Map getOrderItemsByFormattedShippingDate()
        This method returns a Map of Lists of OrderItemDataBeans. Each list is mapped by the formattedEstimatedShippingTime for the orderitems in the list. The list of items is sorted.
        Usage:
        <c:forEach items="${orderBean.orderItemsByFormattedShippingDate}" var="itemList" >
        <tr>
        <td> <c:out value="${itemList.key}"/> </td>

        <td><table>
        <c:forEach items="${itemList.value}" var="item">
        <tr>
        <td> <c:out value="${item.orderItemId}" </td>
        </tr>
        </c:forEach>
        </table></td>
        </tr>
        </c:forEach>
        Returns:
        a map of lists(Collection) of OrderItemDataBeans
        See Also:
        OrderItemDataBean
      • getAdvancedPaymentInfo

        public java.util.List getAdvancedPaymentInfo()
        This method requires Event Driven Payments (EDP). It will return a list of payment instructions for this order
        Usage:
        <c:forEach items="${orderBean.getAdvancedPaymentInfo}" var="payInst" >
        <tr>
        <td align="right"> PaymentMethod: </td>
        <td> <c:out value="${payInst.paymentMethodId}" </td>
        <td align="right"> Id: </td>
        <td> <c:out value="${payInst.id}" </td>
        <td align="right"> Amount: </td>
        <td> <c:out value="${payInst.paymentMethodId}" </td>
        <c:forEach items="${payInst.protocolData}" var="payInfo" >
        <td align="right"> <c:out value="${payInfo.key}:"> </td>
        <td align="right"> <c:out value="${payInfo.value}"> </td>
        </c:forEach>
        </tr>
        </c:forEach>
        Returns:
        a List of EDPPaymentInstruction. An empty list will be returned if there is none.
        See Also:
        EDPPaymentInstruction
      • getCurrentCharges

        public java.util.Map getCurrentCharges()
        It will return a list of current charges and the items associated with the current charges.
        This method returns a Map. The Map contains a key for dates associated with the charges and it contains a key for the charges.
        Map currentCharges

        keys:

        dates
        value: a Map
        keys:
        date
        value: a Map
        keys:
        shipMode/shipTo
        value: ArrayList of OrderItemDataBean
        chargeTypes
        value: a Map
        keys:
        chargeType
        value: FormattedMonetaryAmountDataBean
        Note: This is a generic structure used for current charges and future charges. For current charges, there will be only 1 date entry for the estimated ship date
        Usage:
        <c:set value="${orderBean.currentCharges}" var="chargesByDates">
        <!-- key is date; value is a Map -->
        <c:forEach items="chargesByDates.dates" var="datesMap">
        <h2>Estimated Ship Date: <c:out value="${datesMap.key}"/></h2>
        <!-- key is orderItems : value a Map -->
        <tr>
        <th align="center"> Quantity </th>
        <th align="center"> Item </th>
        <th align="center"> Price </th>
        </tr>
        <c:forEach items="${datesMap.value}" var="itemBeansMap" >
        <!-- key is shipMode/shipTo : value an ArrayList -->
        <c:forEach items="${itemBeansMap.value}" var="item">
        <tr>
        <td align="center"> <c:out value="${item.formattedQuantity}:"/> </td>
        <td align="center"> <c:out value="${item.catalogEntryDataBean.description.name}:"/> </td>
        <td align="right"> <c:out value="${item.FormattedTotalProduct}:"/> </td>
        </tr>
        </c:forEach>
        </c:forEach>
        </c:forEach>
        <!-- now the charges for all the preceding dates -->
        <!-- key is chargeTypes : value a Map -->
        <tr>
        <th align="center"> Charge </th>
        <th align="center"> Amount </th>
        </tr>
        <c:forEach items="${chargesByDates.chargeTypes}" var="charge" >
        <tr>
        <td> <c:out value="${charge.key}" </td>
        <td> <c:out value="${charge.value}" </td>
        </tr>
        </c:forEach>


        Primary Keys:
        Keys Value
        dates Map of dates
        key value
        date (a formatted date by locale without the time) Map of OrderItemDataBeans
        key value
        shipmode/address combination ArrayList of OrderItemDataBeans
        chargeTypes Map of charges listed below

        Keys for charges:
        Values are FormatMonentaryDataBean
        adjustmentTotal
        productTotal
        taxTotal
        originalShippingTotal
        shippingAdjustmentTotal
        shippingAdjustmentTotal
        shippingTaxTotal
        total

        Returns:
        a List of EDPPaymentInstruction. An empty list will be returned if there is none.
        See Also:
        EDPPaymentInstruction
      • getFutureCharges

        public java.util.Map getFutureCharges()
        It will return a list of the future charges and the items associated with the future charges.

        Usage:

        <c:set value="${orderBean.futureCharges}" var="chargesByDates">
        <!-- key is date; value is a Map -->

        <c:forEach items="chargesByDates.dates" var="datesMap">
        <h2>Estimated Ship Date: <c:out value="${datesMap.key}"/></h2>
        <c:set value="${datesMap.value}" var="dateEntryMap">
        <!-- key is orderItems/chargeTypes : value is Map/Map -->
        <tr>
        <th align="center"> Quantity </th>
        <th align="center"> Item </th>
        <th align="center"> Price </th>
        </tr>
        <c:forEach items="${dateEntryMap.orderItems}" var="itemBeansMap" >
        <!-- key is shipMode/shipTo : value an ArrayList -->
        <c:forEach items="${itemBeansMap.value}" var="item">
        <tr>
        <td align="center"> <c:out value="${item.formattedQuantity}:"/> </td>
        <td align="center"> <c:out value="${item.catalogEntryDataBean.description.name}:"/> </td>
        <td align="right"> <c:out value="${item.FormattedTotalProduct}:"/> </td>
        </tr>
        </c:forEach>
        </c:forEach>
        <!-- now the charges for all the future dates -->
        <!-- key is chargeTypes : value a Map -->
        <tr>
        <th align="center"> Charge </th>
        <th align="center"> Amount </th>
        </tr>
        <c:set value="${dateEntryMap.chargeTypes}" var="charge" >
        <tr>
        <td> <c:out value="${charge.key}" </td>
        <td> <c:out value="${charge.value}" </td>
        </tr>

        </c:forEach>

        <!-- now the charges for all the preceding dates -->
        <!-- key is chargeTypes : value a Map -->
        <tr>
        <th align="center"> Charge </th>
        <th align="center"> Amount </th>
        </tr>
        <c:forEach items="${chargesByDates.chargeTypes}" var="charge" >
        <tr>
        <td> <c:out value="${charge.key}" </td>
        <td> <c:out value="${charge.value}" </td>
        </tr>
        </c:forEach>


        Primary Keys:
        Keys
        Value
        dates
        Map of dates
        key
        date (a formatted date by locale without the time)
        value
        Map of dateEntry
        Keys
        Value
        orderItems
        Map of OrderItemDataBeans
        key
        shipmode/address combination
        value
        ArrayList of OrderItemDataBeans
        chargeTypes
        Map of charges listed below
        keys are for charges
        values are FormatMonentaryDataBean of items list in the same date
        adjustmentTotal
        productTotal
        taxTotal
        originalShippingTotal
        shippingAdjutmentTotal
        shippingTaxTotal
        discountAdjustmentTotal
        surchargeAdjustmentTotal
        total
        chargeTypes
        Map of charges listed below

        Keys for charges:
        Values are FormatMonentaryDataBean
        adjustmentTotal
        productTotal
        taxTotal
        originalShippingTotal
        shippingAdjutmentTotal
        shippingTaxTotal
        total

        Returns:
        a List of EDPPaymentInstruction. An empty list will be returned if there is none.
        See Also:
        EDPPaymentInstruction
      • getFutureTotal

        public java.math.BigDecimal getFutureTotal()
        It returns the total charge to be made in the future. This method returns the FutureTotal
        Returns:
        FutureTotal
      • getFutureShippingTaxTotal

        public java.math.BigDecimal getFutureShippingTaxTotal()
        It returns the shipping tax total to be made in the future. This method returns the FutureShippingTaxTotal
        Returns:
        FutureShippingTaxTotal
      • getFutureTotalShippingCharge

        public java.math.BigDecimal getFutureTotalShippingCharge()
        It returns the shipping charge total to be made in the future. This method returns the FutureTotalShippingCharge
        Returns:
        FutureTotalShippingCharge
      • getFutureShippingCharge

        public java.math.BigDecimal getFutureShippingCharge()
        It returns the base shipping charge total to be made in the future. This method returns the FutureShippingCharge
        Returns:
        FutureShippingCharge
      • getFutureShippingAdjustmentTotal

        public java.math.BigDecimal getFutureShippingAdjustmentTotal()
        It returns the shipping adjustment total to be made in the future. This method returns the FutureShippingAdjustmentTotal
        Returns:
        FutureShippingAdjustmentTotal
      • getFutureTaxTotal

        public java.math.BigDecimal getFutureTaxTotal()
        It returns the tax total to be made in the future. This method returns the FutureTaxTotal
        Returns:
        FutureTaxTotal
      • getFutureAdjustmentTotal

        public java.math.BigDecimal getFutureAdjustmentTotal()
        It returns the adjustment total to be made in the future. This method returns the FutureAdjustmentTotal
        Returns:
        FutureAdjustmentTotal
      • getFutureDiscountAdjustmentTotal

        public java.math.BigDecimal getFutureDiscountAdjustmentTotal()
        It returns the discount adjustment total to be made in the future. This method returns the FutureDiscountAdjustmentTotal
        Returns:
        FutureDiscountAdjustmentTotal
      • getFutureSurchargeAdjustmentTotal

        public java.math.BigDecimal getFutureSurchargeAdjustmentTotal()
        It returns the surcharge adjustment total to be made in the future. This method returns the FutureSurchargeAdjustmentTotal
        Returns:
        FutureSurchargeAdjustmentTotal
      • getFutureProductTotal

        public java.math.BigDecimal getFutureProductTotal()
        It returns the product total to be made in the future. This method returns the FutureProductTotal
        Returns:
        FutureProductTotal
      • getPaymentInstructions

        public OrderDataBean.PaymentInstruction[] getPaymentInstructions()
        This method returns the payment instructions associated with this order
        Returns:
        the payment instructions associated with this order
      • getPaymentAmountRemaining

        public FormattedMonetaryAmountDataBean getPaymentAmountRemaining()
        This method returns the formatted amount not allocated to a payment. It returns the amount of the order that has not been allocated to a payment.
        Returns:
        FormattedMonetaryAmountDataBean
      • isBlocked

        public boolean isBlocked()
        This method indicates whether the order is blocked or not. Blocked is a synonym for a "hold"
        Returns:
        true if the order is blocked, false otherwise
      • getAllowableShippingAddress

        public AddressDataBean[] getAllowableShippingAddress()
        This method returns a list of shipping addresses allowed for this order as a single shipping address. The single shipping address means the whole order ships to one address instead of different addresses by order items. The allowed addresses for the whole order should be common addresses for each order items.
        Returns:
        AddressDataBean[] the AddressDataBean array.
      • isPersonalAddressesAllowedForShipping

        public boolean isPersonalAddressesAllowedForShipping()
        This method returns if a personal address is allowed for this order as a single shipping address. The single shipping address means the whole order ships to one address instead of different addresses by order items. Only if the personal address is allowed by each order items, it is allowed for the whole order to ship to a single shipping address.
        Returns:
        true a personal address is allowed. false a personal address is not allowed.
      • isWaitingForApproval

        public boolean isWaitingForApproval()
        This method indicates whether the order is waiting for order approval by the Buyer Approver.
        Returns:
        true if the order is waiting for approval
      • isRequiresReview

        public boolean isRequiresReview()
        This method indicates whether the order requires review for payment AVS score
        Returns:
        true if the order is requires review
      • getCurrentPage

        public int getCurrentPage()
        This method returns current page number.
        Returns:
        the current page number.
      • getPageSize

        public int getPageSize()
        This method returns page size.
        Returns:
        the page size.
      • setCurrentPage

        public void setCurrentPage(int i)
        This method sets current page number.
        Parameters:
        i - the current page number.
      • setPageSize

        public void setPageSize(int i)
        This method sets page size.
        Parameters:
        i - the page size.
      • getTotalPages

        public int getTotalPages()
        This method returns the total page number.
        Returns:
        the total page number.
      • getTotalSize

        public int getTotalSize()
        This method returns total OrderItem number.
        Returns:
        the total size of order items.
      • getOrderItemDataBeansByPageNumber

        public OrderItemDataBean[] getOrderItemDataBeansByPageNumber(int pageNum)
        This method returns a list of order item data beans by the page number. It is used for pagination of order items.
        • Take an example for the usage of this method to support pagination as below:
          setOrderId(String);
          setPageSize(int);
          getOrderItemDataBeansByPageNumber(int);

          Note: page number starts from 1
        • To customize the pagination using where clause pushed down, before calling this method, the parameterized pushed down clause should be set using setOrderItemWhereAndOrderByClause(String) and setOrderItemWhereAndOrderByClauseParameters(Object[]).
          For example, to get the pending order items of the order, the clause can be "ORDERS_ID = ? AND STATUS = ? order by ORDERITEMS_ID". And the parameter array for the clause can be Object[]{"10001","P"}.
        • If the where clause is not set, it uses the default clause "ORDERS_ID = ? order by ADDRESS_ID, ORDERITEMS_ID" and returns all the order items of the order for this page.
        Parameters:
        pageNum - the page number.
        Returns:
        OrderItemDataBean[] the array of order item data beans.
      • getOrderItemDataBeansInCurrentPage

        public OrderItemDataBean[] getOrderItemDataBeansInCurrentPage()
        This method returns a list of order item data beans in the current page. It is used for pagination of order items.
        • Take an example for the usage of this method to support pagination as below:
          setOrderId(String);
          setPageSize(int);
          setCurrentPage(int);
          getOrderItemDataBeansInCurrentPage();

        • To customize the pagination using where clause pushed down, before calling this method, the parameterized pushed down clause should be set using setOrderItemWhereAndOrderByClause(String) and setOrderItemWhereAndOrderByClauseParameters(Object[]).
          For example, to get the pending order items of the order, the clause can be "ORDERS_ID = ? AND STATUS = ? order by ORDERITEMS_ID". And the parameter array for the clause can be Object[]{"10001","P"}.
        • If the where clause is not set, it uses the default clause "ORDERS_ID = ? order by ADDRESS_ID, ORDERITEMS_ID" and returns all the order items of the order for this page.
        Returns:
        OrderItemDataBean[] the array of order item data beans.
      • isHistoryExisted

        public boolean isHistoryExisted()
        Check if this order has order history record.
        Returns:
        true when there is order change history record, otherwise return false.
      • setOrderItemWhereAndOrderByClause

        public void setOrderItemWhereAndOrderByClause(java.lang.String clause)
        This method sets the where and orderby clause of SQL statement to find order items. For example, the clause can be "ORDERS_ID = ? AND STATUS = ? order by ORDERITEMS_ID". And the parameter list for the clause can be Object[]{"10001","P"}. If the where clause is not set, use the default clause "ORDERS_ID = ? order by ADDRESS_ID, ORDERITEMS_ID".
        Parameters:
        clause - the where and orderby clause to find order items.
      • setOrderItemWhereAndOrderByClauseParameters

        public void setOrderItemWhereAndOrderByClauseParameters(java.lang.Object[] parameters)
        This method sets the parameters for the where clause of SQL statement to find order items. The element of the parameter array should match the where clause set by the method setOrderItemWhereAndOrderByClause(String).
        Parameters:
        parameters - the array of parameters for the where clause to find order items.
      • getOrderItemDataBeansByWhereClause

        public OrderItemDataBean[] getOrderItemDataBeansByWhereClause()
        This method gets the array of order item data beans using the parameterized query pushed down.
        • If the where clause is not set, it uses the default where clause "ORDERS_ID = ? order by ADDRESS_ID, ORDERITEMS_ID" and returns all the order items of the order.
        • If the where clause is set, it uses the parameterized pushed down clause to find order items. For example, the clause can be "ORDERS_ID = ? AND STATUS = ? order by ORDERITEMS_ID" set by setOrderItemWhereAndOrderByClause(String). And the parameter list for the clause can be Object[]{"10001","P"} set by setOrderItemWhereAndOrderByClauseParameters(Object[]).
        Returns:
        the array of order item data beans.
      • getOrderItemDataBeans

        public OrderItemDataBean[] getOrderItemDataBeans(int startIndex,
                                                         int endIndex)
        This method returns a list of order item data beans from the specified startIndex inclusive and endIndex exclusive. It is used for pagination of order items.
        • Take an example for the usage of this method to support pagination as below:
          setOrderId(String);
          getOrderItemDataBeans(int,int);

          Note: start index starts from 0
        • To customize the pagination using where clause pushed down, before calling this method, the parameterized pushed down clause should be set using setOrderItemWhereAndOrderByClause(String) and setOrderItemWhereAndOrderByClauseParameters(Object[]).
          For example, to get the pending order items of the order, the clause can be "ORDERS_ID = ? AND STATUS = ? order by ORDERITEMS_ID". And the parameter array for the clause can be Object[]{"10001","P"}.
        • If the where clause is not set, it uses the default clause "ORDERS_ID = ? order by ADDRESS_ID, ORDERITEMS_ID" and returns all the order items of the order for this page.
        Parameters:
        startIndex - start index
        endIndex - end index
        Returns:
        OrderItemDataBean[] the array of order item data beans.
      • getLatestOrderVersion

        public java.lang.Short getLatestOrderVersion()
        This method gets the latest order version number. If there is no order change history, it returns null.
        Returns:
        the latest order version.
      • getNextAvailableTieCode

        public java.lang.Short getNextAvailableTieCode()
        This method gets the next available tie code for order items. It first gets the maximal value from all the tie codes in the order. And the next available tie code is get by adding 1 to the maximal value. If the maximal tie code is the max value of the short type can have, it returns null as a result.
        Returns:
        the next available tie code.