class HibernateMenuDAO extends HibernatePersistentObjectDAO<Menu> implements MenuDAO {

	@Override
	public String computePathExtended(long menuId) {
		Menu menu = findById(menuId);
		if (menu == null)
			return null;
		String path = menuId != 1 ? menu.getName() : "";
		while (menu != null && menu.getId() != menu.getParentId() && menu.getId() != 1) {
			menu = findById(menu.getParentId());
			if (menu != null)
				path = (menu.getId() != 1 ? menu.getName() : "") + "/" + path;
		}
		if (!path.startsWith("/"))
			path = "/" + path;
		return path;
	}

	protected  HibernateMenuDAO();

}