Java Utililty Methods SQL ResultSet Double Read

List of utility methods to do SQL ResultSet Double Read

Description

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

Method

doublegetDoubleOrNanFromResultSet(ResultSet rs, int index)
get Double Or Nan From Result Set
double value = rs.getDouble(index);
if (rs.wasNull()) {
    value = Double.NaN;
return value;
DoublegetDoubleOrNull(ResultSet rs, String columnName)
get Double Or Null
double sVal = rs.getDouble(columnName);
if (rs.wasNull()) {
    return null;
return new Double(sVal);
DoublegetDoubleValue(ResultSet resultSet, int columnIndex)
Return any double value.
double value = resultSet.getDouble(columnIndex);
if (resultSet.wasNull()) {
    return null;
return Double.valueOf(value);
Double[]readDouble(ResultSet resultSet, String columnName)
Extracts a Double[] field named columnName from current resultSet record
Double[] doubleArray = null;
try {
    doubleArray = (Double[]) resultSet.getArray(columnName).getArray();
} catch (SQLException x) {
return doubleArray;
DoublereadDoubleFromResultSet(ResultSet rs, String column)
read Double From Result Set
double d = rs.getDouble(column);
return rs.wasNull() ? null : d;