public static <T> ResultPage<T> createCriterialBasedList(final List<T> realList,
                                                             final BaseCriteria baseCriteria,
                                                             final long totalSize) {
        final PageRequest pageRequest = baseCriteria.getPageRequest();
        final long offset = pageRequest != null && pageRequest.getOffset() != null
                ? pageRequest.getOffset()
                : 0;
        final PageResponse pageResponse = new PageResponse(offset, realList.size(), totalSize, true);
        return new ResultPage<>(realList, pageResponse);
    }
Used for filter queries (maybe bounded).
stroom-util-shared/src/main/java/stroom/util/shared/ResultPage.java