Hibernate-Generic-Dao: Genericdaoexamples
Hibernate-Generic-Dao: Genericdaoexamples
GenericDAOExamples - hibernate-generic-dao - Examples of using GenericDAO - Generic DAO implementation: extendable, detailed search, remote
My favorites | Sign in
hibernate-generic-dao
Generic DAO implementation: extendable, detailed search, remote service interface Project Home Search Downloads Wiki for Issues Source Search Current pages
Search projects
GenericDAOExamples
Examples of using GenericDAO
Updated Feb 26, 2011 by dwolvert
Here is all the code it usually takes to create a DAO interface and implementation for a P r o j e c tdomain object; all the content is inherited from the superclass:
p u b l i ci n t e r f a c eP r o j e c t D A Oe x t e n d sG e n e r i c D A O < P r o j e c t ,L o n g >{ } p u b l i cc l a s sP r o j e c t D A O I m p le x t e n d sG e n e r i c D A O I m p l < P r o j e c t ,L o n g >i m p l e m e n t sP r o j e c t D A O{ }
A more complex example can be found in the test code at: http://code.google.com/p/hibernate-generic-dao/source/browse/tags/1.0.0/daohibernate/src/test/java/test/googlecode/genericdao/dao/hibernate/dao/ProjectDAOImpl.java
Comment by [email protected], Jul 14, 2011 Is it possible to use naming strategies to externalize the hql queries. Are there any examples of that? Comment by project member dwolvert, Jul 15, 2011 The framework doesn't provide anything for that. Of course you can always add whatever custom methods you want to your DAO and use any and all Hibernate features. Comment by [email protected], Sep 12, 2012 The Criteria crit getSesion().createCriteria(Project.class); is incorrect
https://code.google.com/p/hibernate-generic-dao/wiki/GenericDAOExamples
1/1