class HibernateMenuDAO extends HibernatePersistentObjectDAO<Menu> implements MenuDAO {

	public List<Menu> findByParentId(long parentId) {
		List<Menu> coll = new ArrayList<Menu>();
		List<Menu> temp = findChildren(parentId, null);
		Iterator<Menu> iter = temp.iterator();

		while (iter.hasNext()) {
			Menu menu = iter.next();
			coll.add(menu);

			List<Menu> coll2 = findByParentId(menu.getId());

			if (coll2 != null) {
				coll.addAll(coll2);
			}
		}

		return coll;
	}

	protected  HibernateMenuDAO();

}