As far as I know it's a good practice to have hashCode along with equals. Do you think this is a problem? If you are delegating to the object you will have a hashcode anyways, and if you are using an id like I am you can always do Long.valueOf(id).hashCode().
-Igor > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Phil Kulak > Sent: Monday, August 15, 2005 10:06 PM > To: [email protected] > Subject: Re: [Wicket-user] [Wicket] DataView and optimized > item removal > > 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 > > > ------------------------------------------------------- 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
