/** * Retrieve a single result from the query. Best used if you expect a * single result, but this isn't enforced on the database. * @param criteriaQuery JPA criteria * @return a DAO specified by the criteria */ public T singleResult(Context context, CriteriaQuery criteriaQuery) throws SQLException { Query query = this.getHibernateSession(context).createQuery(criteriaQuery); return singleResult(query); }