The DAO knows how to connect to the database, do a query or update, return the results. Let's keep all JDBC knowledge in the data accessor so the business layer doesn't import any java.sql classes. The data accessor has to translate all database things into generic things. Imagine trying to change a data acessor from a database source to a remote web service call source, or a JMS source. Keep its interface very generic.
We can fix it! We just need some baling wire, some WD-40, a bit of duct tape and this tiny ad:
Free, earth friendly heat - from the CodeRanch trailbosshttps://www.kickstarter.com/projects/paulwheaton/free-heat