|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.dse.base.ObjectFormat | +--com.ibm.dse.appl.ej.base.ConvertAmountFormat
The ConvertAmountFormat class is used to format a BigDecmial based on a currency code. Amount is stored in database as a BigDecimal with decimal moved to the far right. Based on the currency code stored with the Currency Data Name, we can shift the decimal back to its own place. It is used with the HashtableFormat.
ObjectFormat
,
HashtableFormat
, Serialized FormFields inherited from class com.ibm.dse.base.ObjectFormat |
dataElementName,
key |
Constructor Summary | |
ConvertAmountFormat()
|
Method Summary | |
java.lang.Object |
format(DataElement aDataElement)
Formats aDataElement and returns it as an Object. |
protected java.lang.String |
getAmountDataName()
Get a amount data name |
protected java.lang.String |
getCurrencyDataName()
Get a currency data name |
protected java.util.ListResourceBundle |
getResourceBundle()
Get a resource bundle |
java.lang.Object |
initializeFrom(Tag aTag)
Initializes an ConvertAmountFormat with the Tag attributes. |
protected void |
setAmountDataName(java.lang.String dataName)
Set an amount data name |
protected void |
setCurrencyDataName(java.lang.String dataName)
Set a currency data name |
protected void |
setResourceBundle(java.lang.String rbName)
Set a resource bundle by giving a resource bundle name |
DataElement |
unformat(java.lang.Object aValue,
DataElement aDataElement)
Shift the decimal place of the BigDecimal stored with the AmountDataName. |
Methods inherited from class com.ibm.dse.base.ObjectFormat |
externalizer,
getDataElementName,
getExternalizer,
getKey,
getName,
getTagName,
readExternal,
readExternal,
removeExternal,
setDataElementName,
setKey,
setName,
toString,
toStrings,
toTags,
writeExternal,
writeExternal |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public ConvertAmountFormat()
Method Detail |
public java.lang.Object format(DataElement aDataElement)
aDataElement
- DataElement, the data element within the operation context to be formattedDataElement
protected java.lang.String getAmountDataName()
protected java.lang.String getCurrencyDataName()
protected java.util.ListResourceBundle getResourceBundle()
ListResourceBundle
public java.lang.Object initializeFrom(Tag aTag) throws java.io.IOException, DSEException
aTag
- Tag, a TagTag
protected void setAmountDataName(java.lang.String dataName)
String,
- an amount data nameprotected void setCurrencyDataName(java.lang.String dataName)
String,
- a currency data nameprotected void setResourceBundle(java.lang.String rbName)
String,
- a resource bundle namepublic DataElement unformat(java.lang.Object aValue, DataElement aDataElement) throws DSEInvalidArgumentException
aValue
- Object, a value, not used in this caseaDataElement
- DataElement, the data element within the operation context to be formattedDataElement
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |