Code example for ResultSet

Methods: getString, wasNull

0
	public void setParameter(PreparedStatement ps, int i, Object parameter, String jdbcType) throws SQLException {
		ps.setString(i, ((String) parameter));
	} 
 
	public Object getResult(ResultSet rs, String columnName) throws SQLException {
		Object s = rs.getString(columnName);
		if (rs.wasNull()) {
			return null; 
		} else { 
			return s;
		} 
	} 
 
	public Object getResult(ResultSet rs, int columnIndex) throws SQLException {
		Object s = rs.getString(columnIndex);
		if (rs.wasNull()) {
			return null; 
		} else { 
			return s;
		} 
	}