-----Original Message-----
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Igor Vaynberg
Sent: Tuesday, April 04, 2006 6:32 PM
To: wicket-user@lists.sourceforge.net
Subject: Re: [Wicket-user]
?Contract for "Iterator IDataProvider.iterator(int first, int count)"
???
If so, I would ask _which_ framework method _should_ trigger the retrieval of database
information needed by both IDataProvider methods? If I knew which of the
two methods were called first – I could put the database query
there. Or, perhaps the database query should be triggered by some other
framework method which is called before either of them.
you are meant to do two queries:
size() { return { select count(*) from blah } }
iterator(int first, int count) { return { select *
from blah where rownum>=first and rownum<first+count }}
-Igor
These
two methods could return inconsistent results if other users’ intervening
CRUD operations affected the number of rows returned.
So if I
want to guard against that, I should allow either one of these methods to
download the rows and count them. Each
method should do that only if the other method hasn’t done it first. Is
that the idea?
|
- RE: [Wicket-user] ?Contract for "Iterator IDataProvi... Frank Silbermann
-