class HibernateMenuDAO extends HibernatePersistentObjectDAO<Menu> implements MenuDAO {

	@Override
	public List<Menu> findByNameAndParentId(String name, long parentId) {
		try {
			return findByWhere(
					"_entity.parentId = " + parentId + " and _entity.name like '" + SqlUtil.doubleQuotes(name) + "'",
					null, null);
		} catch (PersistenceException e) {
			log.error(e.getMessage(), e);
			return new ArrayList<Menu>();
		}
	}

	protected  HibernateMenuDAO();

}