class HibernateMenuDAO extends HibernatePersistentObjectDAO<Menu> implements MenuDAO {

	@Override
	public List<Menu> findChildren(long parentId, Integer max) {
		try {
			return findByWhere("_entity.parentId = ?1 and _entity.id!=_entity.parentId", new Object[] { parentId },
					null, max);
		} catch (PersistenceException e) {
			log.error(e.getMessage(), e);
			return new ArrayList<Menu>();
		}
	}

	protected  HibernateMenuDAO();

}