ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Butler" <jeffgbut...@gmail.com>
Subject Re: Exit out of rowHandler
Date Wed, 30 Jan 2008 21:45:49 GMT
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