code: @SuppressWarnings("unchecked")
      public E findByUniqueCriteria(Criterion... criterion) throws HibernateException {
          LOG.trace("Finding one unique " + entityClass.getSimpleName()
              + " based on " + criterion.length + " criteria");
  
          Criteria criteria = createDistinctRootEntityCriteria(criterion);
          return (E) criteria.uniqueResult();
      }
docs: Gets the unique result, that matches a variable number of passed
  criterions.
  
  @param criterion A variable number of hibernate criterions
  @return Entity matching the passed hibernate criterions
  @throws HibernateException if there is more than one matching result