Code example for CallableStatement

Methods: getInt, wasNull

0
    } 
  } 
 
  @Override 
  public E getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
    int i = cs.getInt(columnIndex);
    if (cs.wasNull()) {
      return null; 
    } else { 
      try { 
        return enums[i];
      } catch (Exception ex) {
        throw new IllegalArgumentException("Cannot convert " + i + " to " + type.getSimpleName() + " by ordinal value.", ex);
      } 
    } 
  } 
   
}