Hi Danilo,
The DAO pattern is VERY good for Hibernate, and I wouldn't write an app without it. It is also possible to create a Generic DAO to handle methods that would be common to all of your code (such as a
getAll() method).
I'd be happy to provide you a code example privately, but I don't post code publicly on JavaRanch anymore.
Jason
Originally posted by Danilo Dadonas:
Hi. I'm new in Hibernate and I want to know if DAO pattern is a good pattern to create the logic to persist the objects.
I don't want to write code for access hibernate methods in my servlets for instance. Also, perhaps I'll persist the objects using XML or ObjectOutputStream and than I think DAO is the best pattern to do this.
I want to discuss it.
Thanks.