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: rowHandler
Date Mon, 27 Dec 2004 16:09:14 GMT
...of course, "new RowHandler" should have been some implementation....

On Mon, 27 Dec 2004 09:08:39 -0700, Clinton Begin
<clinton.begin@gmail.com> wrote:
> Emiliano,
> 
> I've found a good design that works for me.  I consider RowHandlers a
> "one time use" object.  So what I do is pass any additional
> information to the RowHandler as a constructor parameter.  So you
> might have something like:
> 
> ...
> RowHandler rowHandler = new RowHandler (param1, param2, param3);
> sqlMap.queryWithRowHandler(id, parameterObject, rowHandler)
> ...
> 
> This way the RowHandler has all the information it needs, without
> complicating the SQL Maps API (and is a better overall design).
> 
> Cheers,
> Clinton
> 
> On Mon, 27 Dec 2004 08:52:27 -0700, Brandon Goodin
> <brandon.goodin@gmail.com> wrote:
> > You can use queryWithRowHandler.
> >
> > "but I've got to process every row in the result set using" - yep this
> > can be done queryWithRowHandler(String id, Object parameterObject,
> > RowHandler rowHandler)
> >
> > "other input parameters passed to queryForList so: how can I pass them
> > to rowHandler" - yep. the second argument of the queryWithRowHandler
> > is your parameterObject.
> >
> > Brandon
> >
> > On Mon, 27 Dec 2004 16:21:34 +0100, Emiliano Armellin
> > <earmellin@ateikon.com> wrote:
> > > Hello,
> > >
> > > a question about RowHandler's use: it takes only one parameter, the Object
> > > wich represent the result set row, and process it, ok
> > >
> > > but I've got to process every row in the result set using, also, other input
> > > parameters passed to queryForList so: how can I pass them to rowHandler?
> > >
> > >
> > >
> > > --
> > > Emiliano Armellin
> > > W_www.ateikon.com
> > > @_earmellin@ateikon.com
> > > T_
> > > +39 0422 452101
> > >
> >
>

Mime
View raw message