Java Utililty Methods SQL ResultSet BigDecimal Read

List of utility methods to do SQL ResultSet BigDecimal Read

Description

The list of methods to do SQL ResultSet BigDecimal Read are organized into topic(s).

Method

BigDecimalgetBigDecimal(ResultSet res, String name)
Returns the values of the specified column as a BigDecimal.
BigDecimal v = res.getBigDecimal(name);
return res.wasNull() ? null : v;
BigDecimalgetBigDecimal(ResultSet rs, String columnLabel)
get Big Decimal
BigDecimal bigDecimal = rs.getBigDecimal(columnLabel);
if (bigDecimal != null) {
    return bigDecimal;
} else {
    return null;
BigDecimal[]getBigDecimalArray(final ResultSet resultSet, final int index)
get Big Decimal Array
final Array array = resultSet.getArray(index);
return (BigDecimal[]) array.getArray();
BigDecimalgetBigDecimalNotZero(ResultSet rs, String columnLabel)
get Big Decimal Not Zero
BigDecimal bigDecimal = rs.getBigDecimal(columnLabel);
if (bigDecimal == null || bigDecimal.compareTo(BigDecimal.ZERO) == 0) {
    return null;
} else {
    return bigDecimal;