Code example for ResultSet

Methods: getBlob

0
  } 
 
  @Override 
  public int setAttributeValueFromResultSet(final ResultSet resultSet,
    final int columnIndex, final DataObject object) throws SQLException {
    final Blob value = resultSet.getBlob(columnIndex);
    object.setValue(getIndex(), value);
    return columnIndex + 1;
  } 
 
  @Override 
  public int setPreparedStatementValue(final PreparedStatement statement,
    final int parameterIndex, final Object value) throws SQLException {
    if (value == null) {
      final int sqlType = getSqlType();
      statement.setNull(parameterIndex, sqlType);
    } else { 
      Blob blob;
      if (value instanceof Resource) {
        final Resource resource = (Resource)value;
        blob = new LocalBlob(resource);