Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 57882 invoked from network); 2 Feb 2010 04:21:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Feb 2010 04:21:23 -0000 Received: (qmail 13614 invoked by uid 500); 2 Feb 2010 04:21:22 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 13554 invoked by uid 500); 2 Feb 2010 04:21:22 -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 13546 invoked by uid 99); 2 Feb 2010 04:21:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Feb 2010 04:21:22 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of clinton.begin@gmail.com designates 209.85.221.172 as permitted sender) Received: from [209.85.221.172] (HELO mail-qy0-f172.google.com) (209.85.221.172) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Feb 2010 04:21:13 +0000 Received: by qyk2 with SMTP id 2so199612qyk.6 for ; Mon, 01 Feb 2010 20:20:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=JgtdfJqRMCs7owafh4hXEPg09APR5/ZAYeD1oNnUWCk=; b=XgIJpP21B2qtl7fPMhxvxlGMnnpfR+TQb+s6QUaXCOMQe1TdsqhGj328cSaz2Qc+cq AaTH4In0eYg083ThbX6loAX10p0dfCLU92/hpvzQlcb1aoE2SF521YY8neXb6QEGeUrm pNzE6KHwntYodeJzIwYYbgSUWh5K0u7KpHLBs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=FYmG8/tl8emgeJFHRTKKqGMugCYYrSQJQcWsH4AzjKlplXG2+TG9fpAQQetfdgWpgX xdG/NosqpU7vvRZvzzfdxuIttfs3Z5t+2rZheu7LQwF5FSp9H2MSbsP9zEWdYbQiIAQv PJuzkvaWz6y7iozGTeIfNg54lkLIGZhyZVrms= MIME-Version: 1.0 Received: by 10.224.65.81 with SMTP id h17mr2572779qai.112.1265084452556; Mon, 01 Feb 2010 20:20:52 -0800 (PST) In-Reply-To: <27414917.post@talk.nabble.com> References: <27412455.post@talk.nabble.com> <27414093.post@talk.nabble.com> <16178eb11002011710l7bfef69fm367b38132da87949@mail.gmail.com> <27414917.post@talk.nabble.com> Date: Mon, 1 Feb 2010 21:20:52 -0700 Message-ID: <16178eb11002012020w7aaf0a43k99ee96e1d8c03e4@mail.gmail.com> Subject: Re: Custom ResultSet handler From: Clinton Begin To: user-java@ibatis.apache.org Content-Type: multipart/alternative; boundary=00c09f8995d767d323047e966ded --00c09f8995d767d323047e966ded Content-Type: text/plain; charset=ISO-8859-1 It sounds like Spring JDBC might be better for your needs. Clinton On Mon, Feb 1, 2010 at 8:06 PM, costab wrote: > > Wouldn't be better if the iBatis select tag would allow you to specify the > ResultSetHandler class as an attribute? > > I used Spring JDBC and this is how I did it, I used their ResultSetHandler > class to process the ResultSet the way I wanted. Then you can have one > query > but then you can create different types of output, xml or pojos or excel by > simply providing which ResultSetHandler you want to process your query. > > > Clinton Begin wrote: > > > > But if you really want to do this, extend the Configuration class, and > > then > > override the following method: > > > > public ResultSetHandler newResultSetHandler(Executor executor, > > MappedStatement mappedStatement, RowBounds rowBounds, ParameterHandler > > parameterHandler, ResultHandler resultHandler, BoundSql boundSql); > > > > You'll have to use the pure Java configuration approach, not the XML > > configuration. > > > > Is there any sample I can look at to see how you do this? > > > Did you guys ever think of making use of Spring Jdbc? I think iBatis could > borrow some of the Spring Jdbc goodies and build on that foundation. There > are a lot of goodies on both sides and it would be great for users to > "springify" iBatis. That would solve the dilemma that myself and others > experience - which one I should use iBatis or Spring Jdbc? > > > Thanks a lot! > > -- > View this message in context: > http://old.nabble.com/Custom-ResultSet-handler-tp27412455p27414917.html > Sent from the iBATIS - User - Java mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org > For additional commands, e-mail: user-java-help@ibatis.apache.org > > --00c09f8995d767d323047e966ded Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable It sounds like Spring JDBC might be better for your needs.

Clinton
On Mon, Feb 1, 2010 at 8:06 PM, costab <k444@nym.hush.com> wrote:

Wouldn't be better if the iBatis select tag would allow you to specify = the
ResultSetHandler class as an attribute?

I used Spring JDBC and this is how I did it, I used their ResultSetHandler<= br> class to process the ResultSet the way I wanted. Then you can have one quer= y
but then you can create different types of output, xml or pojos or excel by=
simply providing which ResultSetHandler you want to process your query.


Clinton Begin wrote:
>
> But if you really want to do this, extend the Configuration class, and=
> then
> override the following method:
>
> =A0 public ResultSetHandler newResultSetHandler(Executor executor,
> MappedStatement mappedStatement, RowBounds rowBounds, ParameterHandler=
> parameterHandler, ResultHandler resultHandler, BoundSql boundSql);
>
> You'll have to use the pure Java configuration approach, not the X= ML
> configuration.
>

Is there any sample I can look at to see how you do this?


Did you guys ever think of making use of Spring Jdbc? I think iBatis could<= br> borrow some of the Spring Jdbc goodies and build on that foundation. There<= br> are a lot of goodies on both sides and it would be great for users to
"springify" iBatis. That would solve the dilemma that myself and = others
experience - which one I should use iBatis or Spring Jdbc?


Thanks a lot!

--
View this message in context:
http://old.nabble.= com/Custom-ResultSet-handler-tp27412455p27414917.html
Sent from the iBATIS - User - Java= mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


--00c09f8995d767d323047e966ded--