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@xxxxxxxxx> 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@xxxxxxxxxxx> 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@xxxxxxxxxxx
> > T_
> > +39 0422 452101
> >
>
|
|