• Post Reply Bookmark Topic Watch Topic
  • New Topic

DAO responsibilies

 
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.
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!