You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Tomasz Pik <pi...@ais.pl> on 2002/11/11 17:13:57 UTC

Re: cvs commit: jakarta-commons-sandbox/dbutils/src/java/org/apache/commons/dbutils/driver/enhanced EnhancedCallableStatement.java E

> 
> bayard      2002/11/11 07:50:45
> 
>   Modified:    dbutils/src/java/org/apache/commons/dbutils/driver/enhanced
>                         EnhancedCallableStatement.java
>                         EnhancedPreparedStatement.java
>   Log:
>   Added in primitive wrappers for these classes.
>   +
>   +    public Integer getIntegerObject(int idx) throws SQLException {
>   +        return new Integer(getInt(idx));
>   +    }
>   +
>   +    public void setIntegerObject(int idx, Integer i) throws SQLException {
>   +          setInt(idx, (i == null)?0:i.intValue() );
>   +    }

This ignore nulls as values in database.
I think that rs.wasNull ans pstmts.setNull should be used (I've send an example
some days ago, when discussing of dbutils started).

Regards
Tomek Pik
pikus@ais.pl


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>