List of utility methods to do SQL ResultSet String Read
String | getString(ResultSet rs, String name, String ifnull) get String String val = rs.getString(name); return ((val != null) ? val : ifnull); |
void | getStringChunks(ResultSet rs, int colIndex, StringBuffer buf) get String Chunks char[] buffer = new char[1024000]; int charRead = 0; try { Reader input = rs.getCharacterStream(colIndex); while ((input != null) && ((charRead = input.read(buffer)) != -1)) { buf.append(buffer, 0, charRead); } catch (Exception e) { ... |
String | getStringFromResultSetEmptyIsNull(ResultSet rset, String fieldName) get String From Result Set Empty Is Null String string = rset.getString(fieldName); if (string != null && string.isEmpty()) return null; return string; |
List | getStringList(ResultSet resultSet, String columnName) Returns a list of string values using a given SQL result set and column name. List<String> values = null; if (resultSet != null && columnName != null) { values = new ArrayList<String>(); while (resultSet.next()) { values.add(getString(resultSet, columnName)); return values; ... |
String | getStringSuppressSQLException(final ResultSet rs, final String columnLabel) Retrieves the value of the designated column in the current row of this ResultSet object as a String in the Java programming language suppressing SQLException String columnValue = null; try { columnValue = rs.getString(columnLabel); } catch (SQLException ex) { return columnValue; |
String | getStringUTF8(ResultSet rs, String which) get String UTF if (db_Derby) { String str = rs.getString(which); if (rs.wasNull()) return null; return str; byte rv[] = rs.getBytes(which); if (rs.wasNull()) ... |
String | getStringValue(final ResultSet rs, final int index) get String Value try { return rs.getString(index); } catch (SQLException ex) { return null; |
String | getTrimmedStringToUpperCase(ResultSet rs, String columnLabel) get Trimmed String To Upper Case return getString(rs, columnLabel) != null ? nullIfEmpty(getString(rs, columnLabel).toUpperCase()) : null;
|