ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Maves <Nathan.Ma...@Sun.COM>
Subject Re: Way to get specified nullValue in TypeHandlerCallback
Date Tue, 29 Mar 2005 14:48:00 GMT
here is the way I get around it.

	public Object getResult(ResultGetter getter) throws SQLException {
         int value = getter.getInt();
         if (getter.wasNull())
             return null;
         return Frequency.get(value);
     }

only rule here is that you have to call the getter.getInt() before the 
wasNull() check.

Nathan


On Mar 28, 2005, at 10:56 PM, Mike Fagan wrote:

> Hi,
>
> Is there a way to get the nullValue specified in the result map when a 
> TypeHandlerCallback is invoked so I can gracefully deal with null 
> values?
>
>


Mime
View raw message