public ReportParameter getReportParameter(String name) throws ProviderException { Session session = null; try { session = hibernateProvider.openSession(); Criteria criteria = session.createCriteria(ReportParameter.class); criteria.add(Restrictions.eq("name", name)); return (ReportParameter) criteria.uniqueResult(); } catch (HibernateException he) { throw new ProviderException(he); } finally { hibernateProvider.closeSession(session); } }