ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clinton Begin <clinton.be...@gmail.com>
Subject Re: Custom ResultSet handler
Date Tue, 02 Feb 2010 04:20:52 GMT
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
> 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
>
>

Mime
View raw message