@SuppressWarnings("unchecked")
    @Override
    public T fetchOne() throws NonUniqueResultException {
        try {
            QueryModifiers modifiers = getMetadata().getModifiers();
            Query query = createQuery(modifiers, false);
            try {
                return (T) query.uniqueResult();
            } catch (org.hibernate.NonUniqueResultException e) {
                throw new NonUniqueResultException(e);
            }
        } finally {
            reset();
        }
    }
Set a timeout for the underlying JDBC query.
@param timeout the timeout in seconds
@return the current object
querydsl-jpa/src/main/java/com/querydsl/jpa/hibernate/AbstractHibernateQuery.java