Java Utililty Methods SQL ResultSet Float Read

List of utility methods to do SQL ResultSet Float Read

Description

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

Method

FloatgetFloat(ResultSet res, String name)
Returns the values of the specified column as a Float.
float v = res.getFloat(name);
return res.wasNull() ? null : v;
FloatgetFloat(ResultSet resultSet, int columnIndex)
get Float
float value = resultSet.getFloat(columnIndex);
return resultSet.wasNull() ? null : value;
FloatgetFloat(ResultSet resultSet, String columnName)
Returns a float value using a given SQL result set and column name.
Float value = null;
if (resultSet != null && columnName != null) {
    float columnValue = resultSet.getFloat(columnName);
    if (!resultSet.wasNull()) {
        value = new Float(columnValue);
return value;
...
FloatgetFloat(ResultSet rs, String colName)
get Float
float res = rs.getFloat(colName);
return rs.wasNull() ? null : new Float(res);
floatgetFloat(ResultSet rs, String column)
get a float from ResultSet rs with name 'column'
float i = rs.getFloat(column);
if (rs.wasNull())
    i = 0;
return i;
ListgetFloatList(ResultSet resultSet, String columnName)
Returns a list of float values using a given SQL result set and column name.
List<Float> values = null;
if (resultSet != null && columnName != null) {
    values = new ArrayList<Float>();
    while (resultSet.next()) {
        values.add(getFloat(resultSet, columnName));
return values;
...
FloatgetFloatOfNull(ResultSet rs, String columnName)
get Float Of Null
float fVal = rs.getFloat(columnName);
if (rs.wasNull()) {
    return null;
return new Float(fVal);
FloatgetFloatValue(ResultSet resultSet, int columnIndex)
Return any float value.
float value = resultSet.getFloat(columnIndex);
if (resultSet.wasNull()) {
    return null;
return Float.valueOf(value);