ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry Meadors" <lmead...@apache.org>
Subject Re: Exit out of rowHandler
Date Wed, 30 Jan 2008 23:42:41 GMT
Meh, it'll break compatibility, but it adds a great deal of useful
functionality for very little cost. In addition, the 'fix' is to add a
"return true;" to existing code. I wouldn't consider that particularly
onerous...unless you have like 1000 row handlers, in which case, you
probably *deserve* some pain. ;-)

I think it's a great idea.

Larry


On Jan 30, 2008 2:45 PM, Jeff Butler <jeffgbutler@gmail.com> wrote:
> I can't think of any other use for the return value, so I like the idea.
> The only drawback is that this will break existing row handlers.  This could
> be an argument in favor of the two parameter approach - because it could be
> an overloaded method.  Of course, any change to the interface is going to
> cause headaches for existing row handlers.  Maybe we should provide adapter
> classes like AWT?
>
> <shudder>Did I just suggest using AWT as a model?</shudder>
>
> Jeff Butler
>
>
>
> On Jan 30, 2008 1:17 PM, Clinton Begin <clinton.begin@gmail.com> wrote:
>
> >
> > Hmmm... would it be horrible if the return value of handleRow() was a
> > boolean for "continue"?
> >
> > // don't mind the verbosity or any misplaced
> > // capital letters...thank you outlook
> > public boolean handleRow (Object valueObject) {
> >  boolean continue = true;
> >  if (someCondition) {
> >    continue = false;
> >  }
> >  return continue;
> > }
> >
> > I hate to suggest making use of the return value, because there is only
> > one...but it isn't used right now.  Is this the best use of the return
> > value? The alternative is to use a second parameter for controls...
> >
> > public void handleRow (ResultSetControl control, Object valueObject) {
> >  if (someCondition) {
> >    control.setContinue(false);
> >  }
> > }
> >
> > Sorry if this has already been discussed, it's more of a dev@ issue, but
> > since we're talking about it here...
> >
> > Thoughts?
> >
> > Clinton
> >
> >
> >
> >
>

Mime
View raw message