class HibernateMenuDAO extends HibernatePersistentObjectDAO<Menu> implements MenuDAO {

	@Override
	public boolean hasWriteAccess(Menu menu, long userId) {
		if (isWriteEnable(menu.getId(), userId) == false) {
			return false;
		}

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

		for (Menu subMenu : children) {
			if (!hasWriteAccess(subMenu, userId)) {
				return false;
			}
		}

		return true;
	}

	protected  HibernateMenuDAO();

}