This week's book giveaway is in the OCAJP forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
The moose likes Spring and the fly likes Generic DAO and Generic Stored Procedure in Spring Framework 2.5.6 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Generic DAO and Generic Stored Procedure in Spring Framework 2.5.6" Watch "Generic DAO and Generic Stored Procedure in Spring Framework 2.5.6" New topic
Author

Generic DAO and Generic Stored Procedure in Spring Framework 2.5.6

Muhammad Ijaz
Ranch Hand

Joined: Mar 03, 2009
Posts: 34
Hi,

I have been working on revamp of a web application which is going to be built on using the integration of Spring2.5.6+Hibernate3.2+JPA+JSF1.2. To access the database, a generic DAO has been defined. There are thousands of stored procedures in the application, and it is quite unsuitable to write an inner stored procedure class for each stored procedure in the database. So A generic Stored Procedure class has been defined. Following are the Generic Dao, and Generic Stored procedure classes that have been defined. Following is the Generic DAO Implementation class


And here is the Generic Stored Procedure Class



Following code is being used to call the Generic Stored Procedure




I need your precious comments about the approach that I have been adopted to access the database through Generic DAO and Generic Stored Procedure. If this is the right approach, how can I improve it...? If this is not a good approach then what will be the better one?
__________________
Muhammad Ijaz (Pomy)

IBM Certified WebSphere Commerce Application Developer

 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Generic DAO and Generic Stored Procedure in Spring Framework 2.5.6