At my work place, we use DAO pattern to hancle any sort of database operation. It hides bulky statements from programmer. Programmers need to write sql query and logic to handle output data. BaseDao handles all sort of operation and return output in required format.
I found that this class is not perfect. I added the code to control number of connections and to handle connection issues like slow connectivity, no connectivty, number of atttempts for connection etc.
But I would have to add more code to support advance feature of JDBC like providing/accessing binary data, Handling resultsets returned from SPs etc.
Is there any Java Framework or group of classes which can cover many of the database operations?
Please suggest.
I think that you are looking for Java Persistence API. It's a Java EE specification and Hibernate is the most popular implementation.
You could try Spring DAO instead. They have a nice template pattern for handling resultsets.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With