This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Banghead question  RSS feed

 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all.
I have an articale at developerWorks about VO.
we have a table with the following columns :
id, title, producer (as FK), director (as FK)
we presents this table as an entity bean.
the bean provides setter and getter methods for ALL fields.
AFAIK, we don't create setter and getter methods for fields like
producer and director, because the container will take care about
inserting values into them.
AFAIK, some containers will complain if we provide such methods.
any feedbacks ?
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here are some questions for you:

1. Does the container really care/know about value objects -- or is this something that you as a developer integrate into your design?
2. How will anything get achieved without a getter/setter for those fields?
 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a similiar application
database schema for Team :
NAME, CITY
database schema for Player:
ID, EMAIL, TEAM (TEAM is FK)
I didn't create setter and getter methods for team field in Player business interface, yes I have CMR methods.
when calling :
player.setTeam(teamLocal);
the container inserts a value in TEAM column.
any ideas ??
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!