com.ibm.commerce.price.utils

Class MonetaryAmountDataBean

    • Constructor Detail

      • MonetaryAmountDataBean

        public MonetaryAmountDataBean()
        MonetaryAmountDataBean default constructor.
      • MonetaryAmountDataBean

        public MonetaryAmountDataBean(MonetaryAmount aMonetaryAmount,
                                      com.ibm.commerce.common.objects.StoreAccessBean aStoreAccessBean,
                                      java.lang.Integer aLangId)
        MonetaryAmountDataBean constructor.
        Parameters:
        aMonetaryAmount - a monetary amount.
        aStoreAccessBean - the store under which the formatting is to occur.
        aLangId - the language Id under which the formatting is to occur.
    • Method Detail

      • getCounterValueListPrefix

        public java.lang.String getCounterValueListPrefix()
        Get the prefix used to start the list of counter values. The list of counter values will be appended after the primary price and will start with this prefix. The default is " (".
        Returns:
        the prefix for the counter value list.
      • getCounterValueListSeparator

        public java.lang.String getCounterValueListSeparator()
        Get the separator used to separate the list of counter values. The list of counter values will be appended after the primary price. The default is " ".
        Returns:
        the separator for the counter value list.
      • getCounterValueListSuffix

        public java.lang.String getCounterValueListSuffix()
        Get the suffix used to end the list of counter values. The list of counter values will be appended after the primary price and will end with this suffix. The default is ")".
        Returns:
        the prefix for the counter value list.
      • getFormattedCounterValues

        public FormattedMonetaryAmount[] getFormattedCounterValues()
                                                            throws com.ibm.commerce.exception.ECException
        Get a vector of the formatted counter values
        Returns:
        the vector of formatted monetary amounts.
        Throws:
        com.ibm.commerce.exception.ECException
      • getPrimaryFormattedPrice

        public FormattedMonetaryAmount getPrimaryFormattedPrice()
                                                         throws com.ibm.commerce.exception.ECException
        Get the formatted primary price.
        Returns:
        a formatted monetary amount
        Throws:
        com.ibm.commerce.exception.ECException
      • getPrimaryPrice

        public MonetaryAmount getPrimaryPrice()
                                       throws com.ibm.commerce.exception.ECSystemException
        Get the primary price (round customized).
        Returns:
        com.ibm.commerce.price.utils.MonetaryAmount
        Throws:
        com.ibm.commerce.exception.ECSystemException
      • isShowCounterValues

        public boolean isShowCounterValues()
        Return a flag that indicates whether counter values are to be shown in the formatted amount.
        Returns:
        a boolean flag.
      • setCounterValueListPrefix

        public void setCounterValueListPrefix(java.lang.String newCounterValueListPrefix)
        Set the prefix used for the counter value list.
        Parameters:
        newCounterValueListPrefix - the new counter value list prefix.
      • setCounterValueListSeparator

        public void setCounterValueListSeparator(java.lang.String newCounterValueListSeparator)
        Set the separator used for the counter value list.
        Parameters:
        newCounterValueListSeparator - the new counter value list separator.
      • setCounterValueListSuffix

        public void setCounterValueListSuffix(java.lang.String newCounterValueListSuffix)
        Set the suffix used for the counter value list.
        Parameters:
        newCounterValueListSuffix - the new counter value list suffix.
      • setPrimaryPrice

        public void setPrimaryPrice(MonetaryAmount newPrimaryPrice)
        Set the primary price.
        Parameters:
        newPrimaryPrice - the primary monetary amount.
      • setShowCounterValues

        public void setShowCounterValues(boolean newShowCounterValues)
        Set the flag that indicates whether counter values should be shown in the formatted amount.
        Parameters:
        newShowCounterValues - show counter values flag.
      • toString

        public java.lang.String toString()
        Returns a String that represents the value of this object. The string includes: The primary price followed by the counter value list prefix. The counter values separated by the counter value list separator. The counter value suffix.
        Overrides:
        toString in class UnitAmountDataBeanImpl
        Returns:
        a string representation of the product price.