Java Utililty Methods SQL ResultSet Long Read

List of utility methods to do SQL ResultSet Long Read

Description

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

Method

LonggetLong(ResultSet res, String name)
Returns the values of the specified column as a Long.
long v = res.getLong(name);
return res.wasNull() ? null : v;
LonggetLong(ResultSet results, int parameterIndex)
get Long
long value = results.getLong(parameterIndex);
if (results.wasNull()) {
    return null;
return value;
LonggetLong(ResultSet resultSet, int index)
Gets a long value from a current result set.
if (resultSet.getObject(index) != null) {
    return resultSet.getLong(index);
return null;
LonggetLong(ResultSet resultSet, String columnName)
Returns a long value using a given SQL result set and column name.
Long value = null;
if (resultSet != null && columnName != null) {
    long columnValue = resultSet.getLong(columnName);
    if (!resultSet.wasNull()) {
        value = new Long(columnValue);
return value;
...
LonggetLong(ResultSet rs, String colName)
get Long
long res = rs.getLong(colName);
return rs.wasNull() ? null : new Long(res);
longgetLong(ResultSet rs, String column)
get a long from ResultSet rs with name 'column'
long i = rs.getLong(column);
if (rs.wasNull())
    i = 0;
return i;
LonggetLong(ResultSet rs, String columnName)
get a Long object from a result set column with given name
long value = rs.getLong(columnName);
if (rs.wasNull()) {
    return null;
return value;
LonggetLong(ResultSet rs, String columnName)
get Long
long l = rs.getLong(columnName);
return rs.wasNull() ? null : l;
DategetLongDateFromResultSet(ResultSet rset, Enum field)
get Long Date From Result Set
return getLongDateFromResultSet(rset, field.name());
LonggetLongFromResultSet(ResultSet rs, String db_name)
get Long From Result Set
long n = rs.getLong(db_name);
return rs.wasNull() ? null : Long.valueOf(n);