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
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 |
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.
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.