com.ibm.commerce.price.beans
Class PriceDataBean

java.lang.Object
  |
  +--MonetaryAmountDataBean
        |
        +--com.ibm.commerce.price.beans.FormattedMonetaryAmountDataBean
              |
              +--com.ibm.commerce.price.beans.PriceDataBean

public class PriceDataBean
extends FormattedMonetaryAmountDataBean

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

See Also:
Serialized Form

Constructor Summary
PriceDataBean(com.ibm.commerce.price.utils.MonetaryAmount aMonetaryAmount, StoreAccessBean aStoreAccessBean, java.lang.Integer aLanguageId)
          Price data bean constructor.
PriceDataBean(com.ibm.commerce.price.utils.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
 void setStoreId(java.lang.Integer anStoreId)
          set store id (optional).
 
Methods inherited from class com.ibm.commerce.price.beans. FormattedMonetaryAmountDataBean
getAmount, getCommandContext, getCurrency, getRequestProperties, populate, setAmount, setCommandContext, setCurrency, setRequestProperties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PriceDataBean

public PriceDataBean(com.ibm.commerce.price.utils.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(com.ibm.commerce.price.utils.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.
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.
Returns:
Throws:
CreateException
FinderException
RemoteException
NamingException
ECSystemException

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.
Returns:
the CategorizedMonetaryAmountsDataBean containing the taxing monetary amounts, names and descriptions etc.
Throws:
CreateException
FinderException
RemoteException
NamingException
ECSystemException

setCatEntryId

public void setCatEntryId(java.lang.Long aCatEntryId)
Sets the catalog entry id
Parameters:
aCatEntryId - the catalog entry Id.

setStoreId

public void setStoreId(java.lang.Integer anStoreId)
set store id (optional).
Parameters:
anStoreId - the store which calculation is based on.