List of utility methods to do SQL ResultSet Long Read
Long | getLongFromResultSet(ResultSet rs, String field) Returns the Long value corresponding to the given field on the given ResultSet. Long result = null; try { Object value = rs.getObject(field); if (value != null) { result = (Long) value; } catch (Exception e) { return result; |
List | getLongList(ResultSet resultSet, String columnName) Returns a list of long values using a given SQL result set and column name. List<Long> values = null; if (resultSet != null && columnName != null) { values = new ArrayList<Long>(); while (resultSet.next()) { values.add(getLong(resultSet, columnName)); return values; ... |
Long | getLongOrNull(ResultSet rs, String column) get Long Or Null long lVal = rs.getLong(column); if (rs.wasNull()) { return null; return new Long(lVal); |
String | getLongString(ResultSet rs, int pos) Get a long string, which could be a TEXT or CLOB type. String s = rs.getString(pos); if (s != null) { return s; } else { try { Clob c = rs.getClob(pos); return c.getSubString(1, (int) c.length()); } catch (Throwable th) { ... |
Long | getLongValue(ResultSet resultSet, int columnIndex) Return any long value. long value = resultSet.getLong(columnIndex); if (resultSet.wasNull()) { return null; return Long.valueOf(value); |
Object | getLongValue(ResultSet rs, int valueIndex) get Long Value return rs.getString(valueIndex);
|
Long | readLongFromResultSet(ResultSet rs, String column) read Long From Result Set long l = rs.getInt(column); return rs.wasNull() ? null : l; |