com.ibm.commerce.price.beans
Class CategorizedMonetaryAmountsDataBean

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

public class CategorizedMonetaryAmountsDataBean
extends MonetaryAmountDataBean

This DataBean is a formatter bean for formatting multiple monetary amounts that are of different categories. One example that will use this formatter will be the taxation that can be composed of several tax categories (e.g. GST, PST).

See Also:
Serialized Form

Constructor Summary
CategorizedMonetaryAmountsDataBean()
          CategorizedMonetaryAmountFormatter constructor.
CategorizedMonetaryAmountsDataBean(com.ibm.commerce.price.utils.MonetaryAmount aMonetaryAmount, StoreAccessBean aStoreAccessBean, java.lang.Integer aLangId, java.lang.String aCategoryName)
          CategorizedMonetaryAmountFormatter constructor.
CategorizedMonetaryAmountsDataBean(com.ibm.commerce.price.utils.MonetaryAmount aMonetaryAmount, StoreAccessBean aStoreAccessBean, java.lang.Integer aLangId, java.lang.String aCategoryName, java.util.Hashtable aDescHash, java.util.Hashtable aAmountHash, java.util.Hashtable aAmountDBHash)
          CategorizedMonetaryAmountFormatter constructor.
 
Method Summary
 java.lang.String getACategorizedAmountWithName(java.lang.String aCategory)
          Return the monetary amount and name of a particular category.
 java.lang.String getACategorizedValueWithName(java.lang.String aCategory)
          Return the monetary value and name of a particular category.
 java.lang.String getAllCategorizedAmountsWithNames()
          Return all of the categorized monetary amounts and names.
 java.lang.String getAllCategorizedValuesWithNames()
          Return all of the categorized monetary values and names.
 java.util.Hashtable getCategorizedAmountsAndNames()
          Get the categorized names and monetary amounts hashtable.
 java.util.Hashtable getCategorizedAmountsDBAndNames()
          Get the categorized names and MonetaryAmountDataBean hashtable.
 java.util.Hashtable getCategorizedDescriptionsAndNames()
          Get the categorized descriptions and names hashtable.
 java.math.BigDecimal getCategoryAmount()
          Get the category monetary value.
 java.lang.String getCategoryName()
          Get the category name.
  CommandContext getCommandContext()
          Get the command context.
 java.lang.String getCurrency()
          Get the monetary currency.
 int getNoOfCategories()
          Return the total number of categories.
  TypedProperty getRequestProperties()
          Get the request properties.
 java.lang.String getTotalCategorizedAmount()
          Return the total of all the categorized amounts.
 java.lang.String getTotalCategorizedValue()
          Return the total of all the categorized amount values.
 void populate()
          Create the hashtable that contains the categories and their corresponding monetary amounts.
 void setCategorizedAmountsAndNames(java.util.Hashtable aCategorizedAmounts)
          Set the categorized names and monetary amounts hashtable.
 void setCategorizedAmountsDBAndNames(java.util.Hashtable aCategorizedAmountsDB)
          Set the categorized names and MonetaryAmountDataBean hashtable.
 void setCategorizedDescriptionsAndNames(java.util.Hashtable aCategorizedDescriptionsAndNames)
          Set the categorized descriptions and names hashtable.
 void setCategorizedValuesAndNames(java.util.Hashtable aCategorizedValues)
          Set the categorized values and names hashtable.
 void setCategoryAmount(java.math.BigDecimal aCategoryAmount)
          Set the category value.
 void setCategoryName(java.lang.String aCgryName)
          Set the category name.
 void setCommandContext( CommandContext commandContext)
          Set the command context.
 void setCurrency(java.lang.String aCurrency)
          Set the monetary currency.
 void setRequestProperties( TypedProperty param)
          Set the request properties.
 java.lang.String toString()
          Returns all of the categorized monetary amounts or monetary values and their corresponding category names.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CategorizedMonetaryAmountsDataBean

public CategorizedMonetaryAmountsDataBean()
CategorizedMonetaryAmountFormatter constructor.

CategorizedMonetaryAmountsDataBean

public CategorizedMonetaryAmountsDataBean(com.ibm.commerce.price.utils.MonetaryAmount aMonetaryAmount,
StoreAccessBean aStoreAccessBean,
                                          java.lang.Integer aLangId,
                                          java.lang.String aCategoryName)
CategorizedMonetaryAmountFormatter constructor.
Parameters:
aStoreAccessBean -
aLangId -
aCategoryName -
aMonetaryAmount - com.ibm.commerce.price.utils.MonetaryAmount

CategorizedMonetaryAmountsDataBean

public CategorizedMonetaryAmountsDataBean(com.ibm.commerce.price.utils.MonetaryAmount aMonetaryAmount,
StoreAccessBean aStoreAccessBean,
                                          java.lang.Integer aLangId,
                                          java.lang.String aCategoryName,
                                          java.util.Hashtable aDescHash,
                                          java.util.Hashtable aAmountHash,
                                          java.util.Hashtable aAmountDBHash)
CategorizedMonetaryAmountFormatter constructor.
Parameters:
aStoreAccessBean -
aLangId -
aCategoryName -
aDescHash -
aAmountHash -
aAmountDBHash -
aMonetaryAmount - com.ibm.commerce.price.utils.MonetaryAmount
Method Detail

getACategorizedAmountWithName

public java.lang.String getACategorizedAmountWithName(java.lang.String aCategory)
Return the monetary amount and name of a particular category.
Parameters:
aCategory - - the category
Returns:
the String representing monetary amount and the corresponding name of a particular category.

getACategorizedValueWithName

public java.lang.String getACategorizedValueWithName(java.lang.String aCategory)
Return the monetary value and name of a particular category.
Parameters:
aCategory - - the category
Returns:
the String representing monetary value and the corresponding name of a particular category.

getAllCategorizedAmountsWithNames

public java.lang.String getAllCategorizedAmountsWithNames()
Return all of the categorized monetary amounts and names.
Returns:
the String representing all of the categorized monetary amounts and the corresponding category names.

getAllCategorizedValuesWithNames

public java.lang.String getAllCategorizedValuesWithNames()
Return all of the categorized monetary values and names.
Returns:
the String representing all of the categorized monetary values and the corresponding category names.

getCategorizedAmountsAndNames

public java.util.Hashtable getCategorizedAmountsAndNames()
Get the categorized names and monetary amounts hashtable.
Returns:
the Hashtable containing the categorized names and monetary amounts.

getCategorizedAmountsDBAndNames

public java.util.Hashtable getCategorizedAmountsDBAndNames()
Get the categorized names and MonetaryAmountDataBean hashtable.
Returns:
the Hashtable containing the categorized names and MonetaryAmountDataBean.

getCategorizedDescriptionsAndNames

public java.util.Hashtable getCategorizedDescriptionsAndNames()
Get the categorized descriptions and names hashtable.
Returns:
the Hashtable containing the categorized descriptions and names.

getCategoryAmount

public java.math.BigDecimal getCategoryAmount()
Get the category monetary value.
Returns:
the BigDecimal containing the monetary value.

getCategoryName

public java.lang.String getCategoryName()
Get the category name.
Returns:
the String containing the category name.

getCommandContext

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

getCurrency

public java.lang.String getCurrency()
Get the monetary currency.
Returns:
the String representing the monetary currency.

getNoOfCategories

public int getNoOfCategories()
Return the total number of categories.
Returns:
the intcontaining the total numbers of categories.

getRequestProperties

public TypedProperty getRequestProperties()
Get the request properties.
Returns:
the com.ibm.commerce.datatype.TypedProperty containing the request properties.

getTotalCategorizedAmount

public java.lang.String getTotalCategorizedAmount()
Return the total of all the categorized amounts.
Returns:
the String representing the total monetary amount.

getTotalCategorizedValue

public java.lang.String getTotalCategorizedValue()
Return the total of all the categorized amount values.
Returns:
the String representing the total monetary value.

populate

public void populate()
              throws java.lang.Exception
Create the hashtable that contains the categories and their corresponding monetary amounts.
Throws:
java.lang.Exception

setCategorizedAmountsAndNames

public void setCategorizedAmountsAndNames(java.util.Hashtable aCategorizedAmounts)
Set the categorized names and monetary amounts hashtable.
Parameters:
aCategorizedAmounts -

setCategorizedAmountsDBAndNames

public void setCategorizedAmountsDBAndNames(java.util.Hashtable aCategorizedAmountsDB)
Set the categorized names and MonetaryAmountDataBean hashtable.
Parameters:
aCategorizedAmountsDB - the categorized amounts databean and names hashtable.

setCategorizedDescriptionsAndNames

public void setCategorizedDescriptionsAndNames(java.util.Hashtable aCategorizedDescriptionsAndNames)
Set the categorized descriptions and names hashtable.
Parameters:
aCategorizedDescriptionsAndNames -

setCategorizedValuesAndNames

public void setCategorizedValuesAndNames(java.util.Hashtable aCategorizedValues)
Set the categorized values and names hashtable.
Parameters:
aCategorizedValues -

setCategoryAmount

public void setCategoryAmount(java.math.BigDecimal aCategoryAmount)
Set the category value.
Parameters:
aCategoryAmount - the category value.

setCategoryName

public void setCategoryName(java.lang.String aCgryName)
Set the category name.
Parameters:
aCgryName - the category name.

setCommandContext

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

setCurrency

public void setCurrency(java.lang.String aCurrency)
Set the monetary currency.
Parameters:
aCurrency - the monetary currency.

setRequestProperties

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

toString

public java.lang.String toString()
Returns all of the categorized monetary amounts or monetary values and their corresponding category names.
Returns:
the String representing all of the categorized monetary amounts or monetary values and their corresponding category names.