Want more information ?. Try the Web Home Page for this document.

PSPDec Persistence

The following PSPDec properties are persistent (serialized):

DigitsBeforeDP Integer. Number of digits before decimal place.
DigitsAfterDP Integer. Number of digits after decimal place.
DecimalPlace Character. The value retrievable by the getDecimalPlace() method.
Overflow Byte. The overflow value retrievable by the getOverflow() method.
Value Byte Array. Internal numeric value as array of bytes.
ValueStart Integer. Index into Value of current element if this PSPDec is the Num object in a PSPDecAr object.

The Value property stored via serialization is the internal value (in zoned decimal or packed decimal format). This usually represents a single numeric value (for one number only). However there may be multiple numeric values if the PSPDec is being used as the Num object within a PSPDecAr, in which case the PSPDec ValueStart property is used to support the array index value retrievable via the PSPDecAr.getElement() method. For a stand-alone PSPDec, the ValueStart property is always zero.

Our testing indicates that the default persistence mechanism provided by the Java Serializable interface is satisfactory. So far we have found no reason to implement the more sophisticated Externalizable interface for PSPDec. It is highly unlikely that we will do anything (e.g. delete PSPDec properties) that will break the default serialization mechanism in future versions of PSPDec.

We welcome any comments/suggestions from users in this area.