Hi, I browsed the tutorial, but didn't find any explicit expression on the problem. I checked the source again, and found more interesting things.
UserDao defines some new CRUD methods, like saveUser, but the implementation is different from method GenericDaoHibernate.saveObject(), then the sub-Dao really extends GenericDao. Additionally, in service layer, I found that RoleManagerImpl invokes some of CRUD method in GenericDao directly. Well, the value of GenericDao is shown :-D a cup of Java, cheers! Sha Jiang mraible wrote: > > Have you completed the Persistence, Hibernate or Manager tutorials? They > seem to explain it pretty well IMO. > > http://appfuse.org/display/APF/Tutorials > Matt > > On Mon, Jun 23, 2008 at 1:42 AM, Sha Jiang <[EMAIL PROTECTED]> wrote: > >> >> Hi all, >> I'm using AppFuse 2.0.1. >> I used command "mvn appfuse:full-source", then I got an Appfuse example. >> I have some puzzle on DAO layer: How to use >> GenericDao/GenericDaoHibernate? >> >> Let's focus on domain User and its DAO. >> GenericDaoHibernate extends HibernateDaoSupport and implements >> GenericDao; >> UserDaoHibernate extends GenericDaoHibernate and implements UserDao. >> UserDaoHibernate uses Spring's HibernateDaoSupport to "CRUD" the User >> objects. >> Then how about the value of GenericDao/GenericDaoHibernate? >> On the surface, UserDaoHibernate doesn't use the methods of >> GenericDao/GenericDaoHibernate. >> UserManagerImpl doesn't, yet. >> >> In my mind, GenericDao/GenericDaoHibernate is unique utility for database >> operations, >> all of other DAOs just use them to save, remove, update and/or get domain >> objects. >> So, I think UserDao/UserDaoHibernate doesn't extend >> GenericDao/GenericDaoHibernate, >> but composites GenericDao/GenericDaoHibernate. >> Namely, UserDaoHibernate doesn't use HibernateTemplate instance, >> but GenericDao/GenericDaoHibernate instance, to "CRUD" User objects. >> >> In short, I don't see any real operation contributed by >> GenericDao/GenericDaoHibernate. >> I'm so puzzled by the problem. >> >> Thanks for any reply! >> -- >> View this message in context: >> http://www.nabble.com/How-to-use-GenericDao-GenericDaoHibernate--tp18064111s2369p18064111.html >> Sent from the AppFuse - User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > -- View this message in context: http://www.nabble.com/How-to-use-GenericDao-GenericDaoHibernate--tp18064111s2369p18087260.html Sent from the AppFuse - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
