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?
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?