com.ibm.commerce.price.beans

Class FormattedQuantityAmountDataBean

    • Constructor Detail

      • FormattedQuantityAmountDataBean

        public FormattedQuantityAmountDataBean()
                                        throws com.ibm.commerce.exception.ECSystemException
        Formatted quantity amount data bean default constructor.
        Throws:
        com.ibm.commerce.exception.ECSystemException
      • FormattedQuantityAmountDataBean

        public FormattedQuantityAmountDataBean(QuantityAmount aQuantityAmount,
                                               com.ibm.commerce.common.objects.StoreAccessBean aStoreAccessBean,
                                               java.lang.Integer aLangId)
                                        throws com.ibm.commerce.exception.ECSystemException
        Formatted quantity amount data bean constructor.
        Parameters:
        aQuantityAmount - quantity amount to format.
        aStoreAccessBean - store under which the formatting is to occur.
        aLangId - language Id under which the formatting is to occur.
        Throws:
        com.ibm.commerce.exception.ECSystemException
    • Method Detail

      • getCommandContext

        public com.ibm.commerce.command.CommandContext getCommandContext()
        Gets the command context.
        Specified by:
        getCommandContext in interface com.ibm.commerce.beans.SmartDataBean
        Returns:
        the command context.
      • getRequestProperties

        public com.ibm.commerce.datatype.TypedProperty getRequestProperties()
        Gets request properties.
        Specified by:
        getRequestProperties in interface com.ibm.commerce.beans.InputDataBean
        Returns:
        null.
      • populate

        public void populate()
                      throws java.lang.Exception
        This method is used to create the formatted quantity amount. Loads data into the data bean when the DataBeanManager.activate() runs.
        Specified by:
        populate in interface com.ibm.commerce.beans.SmartDataBean
        Throws:
        java.lang.Exception
      • setAmount

        public void setAmount(java.lang.Double newAmount)
        Sets the value of the quantity amount. If this method is not called, zero is assumed.
        Specified by:
        setAmount in interface FormattedQuantityAmountInputDataBean
        Parameters:
        newAmount - quantity value.
      • setCommandContext

        public void setCommandContext(com.ibm.commerce.command.CommandContext commandContext)
        Sets the command context.
        Specified by:
        setCommandContext in interface com.ibm.commerce.beans.SmartDataBean
        Parameters:
        commandContext - the command context.
      • setRequestProperties

        public void setRequestProperties(com.ibm.commerce.datatype.TypedProperty param)
                                  throws java.lang.Exception
        Sets request properties (not implemented).
        Specified by:
        setRequestProperties in interface com.ibm.commerce.beans.InputDataBean
        Parameters:
        param - com.ibm.commerce.datatype.TypedProperty
        Throws:
        java.lang.Exception
      • setUnit

        public void setUnit(java.lang.String newUnit)
        Sets the quantity unit. If this method is not called then the unit is assumed to be C62.
        Specified by:
        setUnit in interface FormattedQuantityAmountInputDataBean
        Parameters:
        newUnit - quantity unit.