This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes DAO methods Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "DAO methods " Watch "DAO methods " New topic
Author

DAO methods

Miguel Cardenete
Greenhorn

Joined: May 31, 2011
Posts: 5
In that place is best to include methods related to an model entity, In the entity or DAO.
In the DAOs is good practice to include search methods related to all entities. findAll, findxxx, etc. .. but what happens if the method is related to a particular entity should be within the hibernate entity for example, or within the DAO passing the entity as parameter.
Ex:

theCar.repare(wheel,tools);
or
carDAO.repare(theCar,wheel,tools);
What is better?


 
 
subject: DAO methods
 
Similar Threads
Cade component diagram and DAO
VB variables? SQL queries?
DAO methods
Part 2, Fast Lane Reader vs EntityBeans
Bitter EJB