I was just trying to get away from n^2 search, off the top of my head I don't see a way around that without hashcode or a comparator.
I definetely don't want to reintroduce uniquekeyprovider, there is really no more point to it. -Igor > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Christian Essl > Sent: Monday, August 15, 2005 10:55 PM > To: [email protected] > Subject: Re: [Wicket-user] [Wicket] DataView and optimized > item removal > > You are right it does. I think it is a very common good > practice to impl hashCode when changing equals and it is not > so much more work if you need OIR at all. > > However I do understand that you do not want to implement an > extra method. > We could either reintroduce IUniqueKeyProvider, change the > impl to equal to the underlying object or replace the HashMap > with a list (or make some reasonable helper). > > What do you think? > > Christian > > There are different alternatives: > > On Mon, 15 Aug 2005 22:06:28 -0700, Phil Kulak > <[EMAIL PROTECTED]> wrote: > > > If I'm reading it right, you're using a HashMap? Does this > mean that a > > proper implementation of hashCode is required as well? I > mean, I know > > it's always a good idea, of course, but is it an official > requirement > > of OIR now? > > > > On 8/15/05, Christian Essl <[EMAIL PROTECTED]> wrote: > >> Thanks Igor. > >> > >> My anonymous cvs is a bit lagging. > >> > >> Regarding the size thing, currently I use > IDataProvider.size(){return > >> Integer.MAX_VALUE;} This works so far fine. Propably we do > not need > >> any code change. This is maybe even better, because than DataView > >> respects the contract that it does not give a count paramter to > >> iterator() where > >> first+count is bigger than what size() returned. Anyway > I'll take a > >> first+look > >> and maybe I should write a test-case for that. > >> > >> Christian > >> > >> On Mon, 15 Aug 2005 18:24:32 -0700, Igor Vaynberg > >> <[EMAIL PROTECTED]> > >> wrote: > >> > >> > All done, check it out and let me know what you think. > >> > -Igor > >> > > >> > > >> >> -----Original Message----- > >> >> From: [EMAIL PROTECTED] > >> >> [mailto:[EMAIL PROTECTED] On > Behalf Of Igor > >> >> Vaynberg > >> >> Sent: Monday, August 15, 2005 11:00 AM > >> >> To: [email protected] > >> >> Subject: RE: [Wicket-user] [Wicket] DataView and optimized item > >> >> removal > >> >> > >> >> Alright, if that's what you guys want :) I will make > the changes > >> >> to make it work with model.equals(model). I am also > going to get > >> >> rid of the uniquekeyprovider since the model comparison > makes it > >> >> obsolete. > >> >> > >> >> I will tag the current version with > PRE_OIR_BY_MODEL_EQUALITY if > >> >> you still need to get to it. > >> >> > >> >> -Igor > >> >> > >> >> > >> >> > -----Original Message----- > >> >> > From: [EMAIL PROTECTED] > >> >> > [mailto:[EMAIL PROTECTED] On Behalf Of > >> >> > Christian Essl > >> >> > Sent: Monday, August 15, 2005 6:44 AM > >> >> > To: [email protected] > >> >> > Subject: Re: [Wicket-user] [Wicket] DataView and > optimized item > >> >> > removal > >> >> > > >> >> > Initially I was not sure (anymore), but after reading > >> >> Phil's comment I > >> >> > also think model.equals(model) is better. I also think the > >> >> > identity definition (wheter through equals or string > uniquekey) > >> >> belongs to the > >> >> > data side, because you can only do this with knowledge > >> >> about the data. > >> >> > And I belief that it can save you some typing if you > have it all > >> >> > in one place. > >> >> > > >> >> > I strongly agree that there should be a property on > >> >> DataView to turn > >> >> > OIR on or off. > >> >> > > >> >> > BTW: Does DataView need to call IDataProvider.size(). > >> >> > Wouldn't it be enough if it just called iterator() with > >> >> viewSize. The > >> >> > iterator just returns than what is there. I have quite some > >> >> > views (unfortunately > >> >> > orderitems) where I do not need paging and can just > get all of > >> >> > them with one select . > >> >> > > >> >> > Christian > >> >> > > >> >> > On Mon, 15 Aug 2005 01:00:38 -0700, Phil Kulak > >> >> > <[EMAIL PROTECTED]> > >> >> > wrote: > >> >> > > >> >> > > Won't it be comparing with the models from the last > >> >> > request? You know, > >> >> > > those models that were detached and may be > discarded, never to > >> >> > > be attached again save that comparison? > >> >> > > > >> >> > > Another problem is that I don't want the DataView using > >> >> > value equality > >> >> > > when row equality is available, which it always will be in > >> >> > this case. > >> >> > > I think if you want to make it more general, use the > >> >> > model's equals so > >> >> > > that it can use value, row, or object identity. I don't > >> >> think that > >> >> > > requiring a proper implementation of equals on the model is > >> >> > > any different from requiring it on the object and > it gives you > >> >> > > more options. > >> >> > > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > ___________________________________________________________ > >> >> > Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - > >> >> > Hier > >> >> > anmelden: http://mail.yahoo.de > >> >> > > >> >> > > >> >> > > >> >> > ------------------------------------------------------- > >> >> > SF.Net email is Sponsored by the Better Software Conference & > >> >> > EXPO September 19-22, 2005 * San Francisco, CA * Development > >> >> > Lifecycle Practices Agile & Plan-Driven Development * Managing > >> >> Projects & Teams > >> >> > * Testing & QA Security * Process Improvement & Measurement * > >> >> > http://www.sqe.com/bsce5sf > >> >> > _______________________________________________ > >> >> > Wicket-user mailing list > >> >> > [email protected] > >> >> > https://lists.sourceforge.net/lists/listinfo/wicket-user > >> >> > > >> >> > > >> >> > > >> >> > >> >> > >> >> > >> >> > >> >> ------------------------------------------------------- > >> >> SF.Net email is Sponsored by the Better Software > Conference & EXPO > >> >> September 19-22, 2005 * San Francisco, CA * Development > Lifecycle > >> >> Practices Agile & Plan-Driven Development * Managing Projects & > >> >> Teams * Testing & QA Security * Process Improvement & > Measurement > >> >> * http://www.sqe.com/bsce5sf > >> >> _______________________________________________ > >> >> Wicket-user mailing list > >> >> [email protected] > >> >> https://lists.sourceforge.net/lists/listinfo/wicket-user > >> >> > >> >> > >> >> > >> > > >> > > >> > > >> > > >> > ------------------------------------------------------- > >> > SF.Net email is Sponsored by the Better Software > Conference & EXPO > >> > September 19-22, 2005 * San Francisco, CA * Development > Lifecycle > >> > Practices Agile & Plan-Driven Development * Managing Projects & > >> > Teams * Testing > >> & > >> > QA > >> > Security * Process Improvement & Measurement * > >> http://www.sqe.com/bsce5sf > >> > _______________________________________________ > >> > Wicket-user mailing list > >> > [email protected] > >> > https://lists.sourceforge.net/lists/listinfo/wicket-user > >> > >> > >> > >> -- > >> Christian Essl > >> > >> > >> > >> > >> > >> ___________________________________________________________ > >> Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier > >> anmelden: http://mail.yahoo.de > >> > >> > >> > >> ------------------------------------------------------- > >> SF.Net email is Sponsored by the Better Software Conference & EXPO > >> September 19-22, 2005 * San Francisco, CA * Development Lifecycle > >> Practices Agile & Plan-Driven Development * Managing > Projects & Teams > >> * Testing & QA Security * Process Improvement & Measurement * > >> http://www.sqe.com/bsce5sf > >> _______________________________________________ > >> Wicket-user mailing list > >> [email protected] > >> https://lists.sourceforge.net/lists/listinfo/wicket-user > >> > > > > > > ------------------------------------------------------- > > SF.Net email is Sponsored by the Better Software Conference & EXPO > > September 19-22, 2005 * San Francisco, CA * Development Lifecycle > > Practices Agile & Plan-Driven Development * Managing > Projects & Teams > > * Testing & QA Security * Process Improvement & Measurement * > > http://www.sqe.com/bsce5sf > > _______________________________________________ > > Wicket-user mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > -- > Christian Essl > > > > > > ___________________________________________________________ > Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - > Hier anmelden: http://mail.yahoo.de > > > > ------------------------------------------------------- > SF.Net email is Sponsored by the Better Software Conference & EXPO > September 19-22, 2005 * San Francisco, CA * Development > Lifecycle Practices > Agile & Plan-Driven Development * Managing Projects & Teams * > Testing & QA > Security * Process Improvement & Measurement * > http://www.sqe.com/bsce5sf > _______________________________________________ > Wicket-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ Wicket-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-user
