IDataProvider should just have detach/attach methods
But i see this will happen:

* TODO 2.0: directly extend [EMAIL PROTECTED] IDetachable}
*
*/
public interface IDataProvider extends Serializable

So that you have a detach and an attach that are called before and after the
size/iterator
So that you can do in attach your loading if you don't want 2 queries.

Because i can see things like:

select * from xxx with max rows 200
and if you are below the 200 you don't do the size query because you already
know the size.

shouldn't we extend from IDetachable in 1.3?

johan


On 12/7/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:

i guess if you are certain the size never changes this works ok

-igor


On 12/7/06, Manuel Barzi <[EMAIL PROTECTED] > wrote:
>
> Well, I just do two queries the first time... retrieving total count
> on size() call (just once), and then retrieve iteration on
> iterator(...) call (every navigation event)... so, in steady-state is
> only one call...
>
> On 12/5/06, Igor Vaynberg < [EMAIL PROTECTED]> wrote:
> > well in the example i gave you there should only be one query to the
> > database
> >
> > -igor
> >
> >
> >
> > On 12/5/06, Manuel Barzi < [EMAIL PROTECTED]> wrote:
> > >
> > > Yes, I have already followed your sample, doing two queries to
> database...
> >  ;)
> > >
> > > On 12/5/06, Igor Vaynberg < [EMAIL PROTECTED]> wrote:
> > > > no its not possible there is logic that ties the return call of
> size()
> > to a
> > > > few things that need to happen before the call to iterator()
> > > >
> > > > all it takes is your own subclass that i have shown you, i dont
> think
> > its a
> > > > big deal.
> > > >
> > > > -igor
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > On 12/5/06, Manuel Barzi < [EMAIL PROTECTED]> wrote:
> > > > >
> > > > > My question is, nevertheless, would it be a significant
> implementation
> > > > > change to swap calls order from to current to iterator(...)
> first and
> > > > > size() later? then adding support for both cases in a
> > > > > SortableDataProvider (Case 1: Big databases - 2 Calls, Case 2:
> Small
> > > > > databases - 1 Call)...
> > > > >
> > > > > >From my point of view, if supporting both cases, just by
> swapping
> > > > > those method calls (if so easy is it...), then it would be
> great, no
> > > > > worries to look for another impl... all-in-one...
> > > > >
> > > > > Just wondering... ;)
> > > > >
> > > > > Thank you for all your answers...
> > > > >
> > > > >
> > > >
> >
> -------------------------------------------------------------------------
> > > > > Take Surveys. Earn Cash. Influence the Future of IT
> > > > > Join SourceForge.net 's Techsay panel and you'll get the chance
> to
> > share
> > > > your
> > > > > opinions on IT & business topics through brief surveys - and
> earn cash
> > > > >
> > > >
> > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
> > > > > _______________________________________________
> > > > > Wicket-user mailing list
> > > > > [email protected]
> > > > >
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > > >
> > > >
> > > >
> > > >
> >
> -------------------------------------------------------------------------
> > > > Take Surveys. Earn Cash. Influence the Future of IT
> > > > Join SourceForge.net's Techsay panel and you'll get the chance to
> share
> > your
> > > > opinions on IT & business topics through brief surveys - and earn
> cash
> > > >
> >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > > >
> > > > _______________________________________________
> > > > Wicket-user mailing list
> > > > [email protected]
> > > >
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > > >
> > > >
> > > >
> > >
> > >
> >
> -------------------------------------------------------------------------
> > > Take Surveys. Earn Cash. Influence the Future of IT
> > > Join SourceForge.net's Techsay panel and you'll get the chance to
> share
> > your
> > > opinions on IT & business topics through brief surveys - and earn
> cash
> > >
> >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > > _______________________________________________
> > > Wicket-user mailing list
> > > [email protected]
> > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> >
> >
> >
> -------------------------------------------------------------------------
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to
> share your
> > opinions on IT & business topics through brief surveys - and earn cash
>
> >
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> >
> > _______________________________________________
> > Wicket-user mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> >
> >
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to