ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Reumann" <ric...@gmail.com>
Subject Just curious - How cloesly do your value objects back the data model?
Date Thu, 04 May 2006 17:46:43 GMT
I'm often torn when developing web applications how Object Oriented I
should build my value objects. For examle...

You might have an Employee table...

employeeId
employeeName
companyId
//..

Do you guys typically have your Employee value object hold "Integer
companyId" or instead populate the companyId in a Company object as a
property of Employee...

class Employee {
   Integer employeeId;
   Company company; //instead of Integer companyId

I typically take the above approach (using Company) but  there are
times when I don't always follow this practice.

--
Rick

Mime
View raw message