• Post Reply Bookmark Topic Watch Topic
  • New Topic

DAO responsibilies  RSS feed

 
Peter Bergoff
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

I hope you all had a nice weekend.

Is it okay for the same DAO to have multiple sql statements in it? Say one for a query call and then another for an update call? For example: can OrderDAO be used to retrieve orders and to update orders?
 
Thomas Hofmann
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

that's the sense of an DAO. Put all JDBC/SQL stuff for an Order into the OrderDAO.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!