code: protected E uniqueResult(CriteriaQuery<E> criteriaQuery) throws HibernateException {
          return AbstractProducedQuery.uniqueElement(
              currentSession()
                  .createQuery(requireNonNull(criteriaQuery))
                  .getResultList()
          );
      }
docs: Convenience method to return a single instance that matches the criteria query,
  or null if the criteria returns no results.
  
  @param criteriaQuery the {@link CriteriaQuery} query to run
  @return the single result or {@code null}
  @throws HibernateException if there is more than one matching result