• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DAO methods

 
Miguel Cardenete
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic