8. Java Interface : Java Classes : com.ca.openroad.ParameterData : getBigDecimal
 
Share this page                  
getBigDecimal
Because of the idiosyncrasies of COM DECIMAL conversions, the values returned by getBigDecimal have variable scale. That is, trailing zeros after the decimal point are always truncated and not reflected in the scale of the BigDecimal instance returned.
To ensure a more consistent handling of scale, Ingres provides an overloaded getBigDecimal method. This method takes an additional integer parameter (between 0 and 28) that specifies the desired minimum scale of the BigDecimal result. This parameter represents only the minimum scale, and the result is zero-padded to achieve at least that requested scale. If a value already contains non-zero digits beyond the requested minimum scale, they will not be truncated.
If you want to reduce the scale for a particular application, you can use the Java BigDecimal methods that provide options to apply whatever type of rounding or truncation you want.
The following table describes COM PDO wrappers:
Wrappers
Description
void release(); // does not throw
Releases the underlying COM PDO instance. After the release method is called, the Java object instance becomes essentially useless and should be discarded.
void declareAttr(String attrName, String attrType);
Wraps the DeclareAttribute method of the underlying COM PDO
void setString(String attrName, String attrValue);
void setInteger(String attrName, Integer attrValue);
void setDouble(String attrName, Double attrValue);
void setBigDecimal(String attrName, BigDecimal attrValue);
void setByteArray(String attrName, byte[] attrValue);
void setDate(String attrName, Date attrValue)
void setInt(String attrName, int attrValue);
void setDbl(String attrName, double attrValue);
Wrap the SetAttribute method of the COM PDO, with implied conversion of the input type
String getString(String attrName);
Integer getInteger(String attrName);
Double getDouble(String attrName);
BigDecicmal getBigDecimal(String attrName);
BigDecicmal getBigDecimal(String attrName, int minScale);
byte[] getByteArray(String attrName);
Date getDate(String attrName)
int getInt(String attrName);
double getDbl(String attrName);
Wrap the GetAttribute method of the COM PDO, and attempt to convert the result into the requested return type
int lastRow(String attrName);
Wraps the LastRow method of the underlying COM PDO
void setEmpty(String attrName);
void setNull(String attrName);
void setBlankDate(String attrName);
void setDateWithoutTime(String attrName, Date attrValue);
Wrap the SetEmpty, SetNull, SetBlankDate, and SetDateWithoutTime methods of the COM PDO
boolean isEmpty(String attrName);
boolean isNull(String attrName);
boolean isBlankDate(String attrName);
boolean isDateWithoutTime(String attrName);
Wrap the IsEmpty, IsNull, IsBlankDate, and IsDateWithoutTime methods of the COM PDO, and convert the result from an integer to a Boolean