commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pi...@ais.pl (Tomasz Pik)
Subject Re: cvs commit: jakarta-commons-sandbox/dbutils/src/java/org/apache/commons/dbutils/driver/enhanced EnhancedCallableStatement.java E
Date Mon, 11 Nov 2002 16:13:57 GMT
> 
> 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:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message