Hibernate, DAO pattern and tree hierarchy

Hi all,

I use Hibernate for a short period of time and now I'm facing a complex problem . I try figure it out what is the best practice for the following scenario:

I have the following classes: Department, Team, Position, all of them inherited from a Entity class even there is almost no difference between them. But I wanted different classes for different entities.

I try to create a tree hierachy, each object is with all others in a bidirectional one-to-many relationship. For example a Department can have Teams and Positions as children and a Position can have Departments and Teams as children.

I created the mapping files and I don't know how to create all necessary methods without duplicating the code.

Questions:

1. Do I need a DAO pattern implemented for this design?

2. Can you recomend some documentation or ideas that will help me find out what is the best approach in this case?

Thanks

[958 byte] By [tauma] at [2007-10-3 3:20:58]
# 1
Write the DAO for the class that is the root of the tree. Sounds like it should be DepartmentDao.I don't know of much better documentation than the Hibernate docs. Check their forum, too.%
duffymoa at 2007-7-14 21:13:12 > top of Java-index,Other Topics,Patterns & OO Design...