com.ibm.commerce.price.beans
Class FormattedQuantityAmountDataBean

java.lang.Object
  |
  +--com.ibm.commerce.price.utils.UnitAmountDataBeanImpl
        |
        +--com.ibm.commerce.price.utils.QuantityAmountDataBeanImpl
              |
              +--com.ibm.commerce.price.beans.FormattedQuantityAmountDataBean
All Implemented Interfaces:
DataBean, FormattedQuantityAmountInputDataBean, FormattedQuantityAmountSmartDataBean, InputDataBean, java.io.Serializable, SmartDataBean

public class FormattedQuantityAmountDataBean
extends QuantityAmountDataBeanImpl
implements FormattedQuantityAmountInputDataBean, FormattedQuantityAmountSmartDataBean

A formatter bean used to format quantity amounts.

See Also:
Serialized Form

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
FormattedQuantityAmountDataBean()
          Formatted quantity amount data bean default constructor.
FormattedQuantityAmountDataBean(QuantityAmount aQuantityAmount, StoreAccessBean aStoreAccessBean, java.lang.Integer aLangId)
          Formatted quantity amount data bean constructor.
 
Method Summary
 java.lang.Double getAmount()
          Get the amount to be formatted.
 CommandContext getCommandContext()
          Get the command context.
 TypedProperty getRequestProperties()
          Get request properties.
 java.lang.String getUnit()
          Get the unit of the quantity amount.
 void populate()
          Create the formatted quantity amount.
 void setAmount(java.lang.Double newAmount)
          Set the value of the quantity amount.
 void setCommandContext(CommandContext commandContext)
          Set the command context.
 void setRequestProperties(TypedProperty param)
          Set request properties (not implemented).
 void setUnit(java.lang.String newUnit)
          Set the quantity unit.
 
Methods inherited from class com.ibm.commerce.price.utils.QuantityAmountDataBeanImpl
getFormattedQuantity, getQuantity, setQuantity
 
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, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FormattedQuantityAmountDataBean

public FormattedQuantityAmountDataBean()
                                throws ECSystemException
Formatted quantity amount data bean default constructor.

FormattedQuantityAmountDataBean

public FormattedQuantityAmountDataBean(QuantityAmount aQuantityAmount,
                                       StoreAccessBean aStoreAccessBean,
                                       java.lang.Integer aLangId)
                                throws 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.
Method Detail

getAmount

public java.lang.Double getAmount()
Get the amount to be formatted.
Specified by:
getAmount in interface FormattedQuantityAmountSmartDataBean
Returns:
the amount.

getCommandContext

public CommandContext getCommandContext()
Get the command context.
Specified by:
getCommandContext in interface SmartDataBean
Returns:
the command context.

getRequestProperties

public TypedProperty getRequestProperties()
Get request properties.
Specified by:
getRequestProperties in interface InputDataBean
Returns:
null.

getUnit

public java.lang.String getUnit()
Get the unit of the quantity amount.
Specified by:
getUnit in interface FormattedQuantityAmountSmartDataBean
Returns:
the unit.

populate

public void populate()
              throws java.lang.Exception
Create the formatted quantity amount.
Specified by:
populate in interface SmartDataBean

setAmount

public void setAmount(java.lang.Double newAmount)
Set 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(CommandContext commandContext)
Set the command context.
Specified by:
setCommandContext in interface SmartDataBean
Parameters:
commandContext - the command context.

setRequestProperties

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

setUnit

public void setUnit(java.lang.String newUnit)
Set 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.