com.ibm.commerce.price.beans
Class PriceDataBean

java.lang.Object
  |
  +--com.ibm.commerce.price.utils.UnitAmountDataBeanImpl
        |
        +--com.ibm.commerce.price.utils.MonetaryAmountDataBean
              |
              +--com.ibm.commerce.price.beans.FormattedMonetaryAmountDataBean
                    |
                    +--com.ibm.commerce.price.beans.PriceDataBean
All Implemented Interfaces:
DataBean, FormattedMonetaryAmountInputDataBean, FormattedMonetaryAmountSmartDataBean, InputDataBean, PriceInputDataBean, PriceSmartDataBean, java.io.Serializable, SmartDataBean

public class PriceDataBean
extends FormattedMonetaryAmountDataBean
implements PriceInputDataBean, PriceSmartDataBean

A formatter bean used to format prices. This bean also contains support for displaying taxes with the price.

See Also:
Serialized Form

Fields inherited from class com.ibm.commerce.price.utils.MonetaryAmountDataBean
iCounterValueListPrefix, iCounterValueListSeparator, iCounterValueListSuffix
 
Fields inherited from interface com.ibm.commerce.beans.InputDataBean
COPYRIGHT
 
Fields inherited from interface com.ibm.commerce.beans.DataBean
emptyString
 
Fields inherited from interface com.ibm.commerce.beans.SmartDataBean
COPYRIGHT
 
Constructor Summary
PriceDataBean(MonetaryAmount aMonetaryAmount, StoreAccessBean aStoreAccessBean, java.lang.Integer aLanguageId)
          Price data bean constructor.
PriceDataBean(MonetaryAmount aMonetaryAmount, StoreAccessBean aStoreAccessBean, java.lang.Integer aLanguageId, java.lang.Long aCatEntryId, CommandContext aCommandContext)
          Price data bean constructor.
 
Method Summary
 java.lang.Long getCatEntryId()
          Get the catalog entry id.
 java.math.BigDecimal getPriceVAT()
          Get total of the price with VAT.
 CategorizedMonetaryAmountsDataBean getTaxes()
          Invokes GetDisplayTaxes command to calculate the taxes for those tax categories that are displayable at product display time.
 void setCatEntryId(java.lang.Long aCatEntryId)
          Sets the catalog entry id
 
Methods inherited from class com.ibm.commerce.price.beans.FormattedMonetaryAmountDataBean
getAmount, getCommandContext, getCurrency, getRequestProperties, populate, setAmount, setCommandContext, setCurrency, setRequestProperties
 
Methods inherited from class com.ibm.commerce.price.utils.MonetaryAmountDataBean
getCounterValueListPrefix, getCounterValueListSeparator, getCounterValueListSuffix, getFormattedCounterValues, getPrimaryFormattedPrice, getPrimaryPrice, isShowCounterValues, setCounterValueListPrefix, setCounterValueListSeparator, setCounterValueListSuffix, setPrimaryPrice, setShowCounterValues, toString
 
Methods inherited from class com.ibm.commerce.price.utils.UnitAmountDataBeanImpl
formatAmount, getCustomizedString, getDescription, getLangId, getNumberUsage, getPrimaryAmount, getPrimaryFormattedAmount, getStoreAccessBean, getSymbol, roundAmount, setLangId, setNumberUsage, setPrimaryAmount, setStoreAccessBean, setUnitManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ibm.commerce.price.beans.FormattedMonetaryAmountInputDataBean
setAmount, setCurrency
 
Methods inherited from interface com.ibm.commerce.beans.InputDataBean
getRequestProperties, setRequestProperties
 
Methods inherited from interface com.ibm.commerce.price.beans.FormattedMonetaryAmountSmartDataBean
getAmount, getCurrency
 
Methods inherited from interface com.ibm.commerce.beans.SmartDataBean
getCommandContext, populate, setCommandContext
 

Constructor Detail

PriceDataBean

public PriceDataBean(MonetaryAmount aMonetaryAmount,
                     StoreAccessBean aStoreAccessBean,
                     java.lang.Integer aLanguageId)
Price data bean constructor.
Parameters:
aMonetaryAmount - monetary amount of the price.
aStoreAccessBean - store under which the formatting is to occur.
aLanguageId - language Id under which the formatting is to occur.

PriceDataBean

public PriceDataBean(MonetaryAmount aMonetaryAmount,
                     StoreAccessBean aStoreAccessBean,
                     java.lang.Integer aLanguageId,
                     java.lang.Long aCatEntryId,
                     CommandContext aCommandContext)
Price data bean constructor.
Parameters:
aMonetaryAmount - monetary amount of the price.
aStoreAccessBean - store under which the formatting is to occur.
aLanguageId - language Id under which the formatting is to occur.
aCatEntryId - the catalog entry id for the price.
aCommandContext - the command context.
Method Detail

getCatEntryId

public java.lang.Long getCatEntryId()
Get the catalog entry id.
Specified by:
getCatEntryId in interface PriceSmartDataBean
Returns:
the Long containing the catalog entry id.

getPriceVAT

public java.math.BigDecimal getPriceVAT()
                                 throws javax.ejb.CreateException,
                                        javax.ejb.FinderException,
                                        java.rmi.RemoteException,
                                        javax.naming.NamingException,
                                        ECSystemException
Get total of the price with VAT.

getTaxes

public CategorizedMonetaryAmountsDataBean getTaxes()
                                            throws javax.ejb.CreateException,
                                                   javax.ejb.FinderException,
                                                   java.rmi.RemoteException,
                                                   javax.naming.NamingException,
                                                   ECSystemException
Invokes GetDisplayTaxes command to calculate the taxes for those tax categories that are displayable at product display time.
Specified by:
getTaxes in interface PriceSmartDataBean
Returns:
the CategorizedMonetaryAmountsDataBean containing the taxing monetary amounts, names and descriptions etc.

setCatEntryId

public void setCatEntryId(java.lang.Long aCatEntryId)
Sets the catalog entry id
Specified by:
setCatEntryId in interface PriceInputDataBean
Parameters:
aCatEntryId - the catalog entry Id.