@SuppressWarnings("unchecked")
    @Override
    public T fetchOne() throws NonUniqueResultException {
        try {
            Query query = createQuery();
            return (T) uniqueResult(query);
        } finally {
            reset();
        }
    }
{@code AbstractHibernateSQLQuery} is the base class for Hibernate Native SQL queries

@param <T> result type
@param <Q> concrete subtype

@author tiwe
querydsl-jpa/src/main/java/com/querydsl/jpa/hibernate/sql/AbstractHibernateSQLQuery.java