Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 65794 invoked from network); 9 May 2007 18:33:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 May 2007 18:33:07 -0000 Received: (qmail 65299 invoked by uid 500); 9 May 2007 18:33:11 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 65289 invoked by uid 500); 9 May 2007 18:33:11 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 65277 invoked by uid 99); 9 May 2007 18:33:11 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 May 2007 11:33:11 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 May 2007 11:33:03 -0700 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1Hlqxu-0001IK-H6 for user-java@ibatis.apache.org; Wed, 09 May 2007 11:32:42 -0700 Message-ID: <10399620.post@talk.nabble.com> Date: Wed, 9 May 2007 11:32:42 -0700 (PDT) From: Paul Sanders To: user-java@ibatis.apache.org Subject: How to map getBytes in iBATIS? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: tendancer@gmail.com X-Virus-Checked: Checked by ClamAV on apache.org 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), DBHandler.STRING_ENCODING_CHARSET) : // "UTF-8" 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? Thanks Paul -- 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.