com.ibm.commerce.price.beans
Class FormattedQuantityAmountDataBean

java.lang.Object
  |
  +--QuantityAmountDataBeanImpl
        |
        +--com.ibm.commerce.price.beans.FormattedQuantityAmountDataBean

public class FormattedQuantityAmountDataBean
extends QuantityAmountDataBeanImpl

A formatter bean used to format quantity amounts.

See Also:
Serialized Form

Constructor Summary
FormattedQuantityAmountDataBean()
          Formatted quantity amount data bean default constructor.
FormattedQuantityAmountDataBean(com.ibm.commerce.price.utils.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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormattedQuantityAmountDataBean

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

FormattedQuantityAmountDataBean

public FormattedQuantityAmountDataBean(com.ibm.commerce.price.utils.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.
Throws:
ECSystemException
Method Detail

getAmount

public java.lang.Double getAmount()
Get the amount to be formatted.
Returns:
the amount.

getCommandContext

public CommandContext getCommandContext()
Get the command context.
Returns:
the command context.

getRequestProperties

public TypedProperty getRequestProperties()
Get request properties.
Returns:
null.

getUnit

public java.lang.String getUnit()
Get the unit of the quantity amount.
Returns:
the unit.

populate

public void populate()
              throws java.lang.Exception
Create the formatted quantity amount.
Throws:
java.lang.Exception

setAmount

public void setAmount(java.lang.Double newAmount)
Set the value of the quantity amount. If this method is not called, zero is assumed.
Parameters:
newAmount - quantity value.

setCommandContext

public void setCommandContext(CommandContext commandContext)
Set the command context.
Parameters:
commandContext - the command context.

setRequestProperties

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

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.
Parameters:
newUnit - quantity unit.