ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Sanders <tendan...@gmail.com>
Subject How to map getBytes in iBATIS?
Date Wed, 09 May 2007 18:32:42 GMT

I am (still) converting a lot of JDBC code to iBATIS and was wondering what
people think is the best way to handle something like this:

accountName = (rs.getBytes(2) != null ? 
                                new String(rs.getBytes(2),
                                new String(""));

I thought I would define a setAccountName in my (Account) bean that took a
byte[] as the arg and do the string encoding in the method. But looking at
the documentation I didn't see a way to map a result parameter to a byte[],
only a Byte? 

Did I miss something, or is there a way to specify the encoding in the map?
Or something else?



View this message in context: http://www.nabble.com/How-to-map-getBytes-in-iBATIS--tf3717367.html#a10399620
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.

View raw message