In this case primaryKey() can be a db primary key or a business primary key
since there is a 1-1 mapping. 

Also, I don't think it would make sense to have dataview depending on an
external IDatabaseModel.

-Igor


> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Jonathan Locke
> Sent: Wednesday, August 10, 2005 1:13 PM
> To: wicket-user@lists.sourceforge.net
> Subject: Re: [Wicket-user] DataView: IDataProvider.primaryKey() vote
> 
> 
> i realize i'm jumping into the middle of a conversation i 
> haven't been following, but i saw the code below and thought of this:
> 
> public interface IDatabaseModel extends IModel {
>     public boolean isSame(IDatabaseModel model); }
> 
> that seems like a nice general way to define sameness between 
> database models without knowing how it's implemented.
> then maybe create an abstract base class for typical database 
> models that define equality in terms of primary keys and/or 
> one that does it in terms of Object.equals().
> my very limited understanding of hibernate is that you want to define
> Object.equals() in hibernate based on business fields rather 
> than primary key.
> but in any case, with the contract above, you could push the 
> notion of how something is "the same" out of the contract and 
> into the implementation, where it probably belongs...
> i don't know.  i may not understand what you're doing.  hope 
> i'm not starting a flame war...
> 
>       jon
> 
> Phil Kulak wrote:
> 
> >-1
> >
> >If we wanted to get that method out of the DataProvider interface, I 
> >think it would be better to move it into the model:
> >
> >public interface IDataModel extends IModel {
> >   public String getPrimaryKey();
> >}
> >
> >I just woudn't like relying on an implementation of equals() 
> that may 
> >or may not exst, and the code because less seft documenting.
> >
> >
> >-------------------------------------------------------
> >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
> >Wicket-user@lists.sourceforge.net
> >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
> Wicket-user@lists.sourceforge.net
> 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
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to