@Nullable
    protected <T> T uniqueResult(CloseableIterator<T> it) {
        try {
            if (it.hasNext()) {
                T rv = it.next();
                if (it.hasNext()) {
                    throw new NonUniqueResultException();
                }
                return rv;
            } else {
                return null;
            }
        } finally {
            it.close();
        }
    }
{@code FetchableQueryBase} extends the {@link QueryBase} class to provide default
implementations of the methods of the {@link com.querydsl.core.Fetchable} interface

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

@author tiwe
querydsl-core/src/main/java/com/querydsl/core/support/FetchableQueryBase.java