• Post Reply Bookmark Topic Watch Topic
  • New Topic

Generic DAO and Generic Stored Procedure in Spring Framework 2.5.6  RSS feed

Muhammad Ijaz
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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)
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!