@Override public Single<Range<Long>> fetchCount(Long itemLimit, Long rowLimit) { Single<Range<Long>> result = delegate.fetchCount(itemLimit, rowLimit); return result; }
@Override public Flowable<T> apply(Range<Long> range) { return delegate.apply(range).map(e -> fn.apply(e.getKey(), e.getValue())); }
default Map<K, V> fetchData(C concept, Range<Long> range) { Map<K, V> result = createPaginator(concept).fetchMap(range); return result; }
@Override public Flowable<Entry<K, O>> apply(Range<Long> range) { return delegate.apply(range).map(e -> Maps.immutableEntry(e.getKey(), fnTransformItem.apply(e.getValue()))); }
default Map<K, V> fetchMap(Range<Long> range) { Map<K, V> result = apply(range) .toMap(Entry::getKey, Entry::getValue) .blockingGet(); // .collect(Collectors.toMap( // Entry::getKey, // Entry::getValue, // (u, v) -> { throw new IllegalStateException(String.format("Duplicate key %s", u)); }, // LinkedHashMap::new)); return result; } }
@Override public Single<Range<Long>> fetchCount(Long itemLimit, Long rowLimit) { Single<Range<Long>> result = delegate.fetchCount(itemLimit, rowLimit); return result; }
@Override public Flowable<Entry<Node, G>> apply(Range<Long> range) { Flowable<Entry<Node, G>> result = MapServiceUtils.createListServiceMappedConcept(qef, mappedConcept, isLeftJoin).createPaginator(null).apply(range); return result; // return fetchMap(range).entrySet().stream(); } }
/** * Select Distinct ?v { * { Select ?v { * concept * } Limit rawLimit } * } Limit resLimit * * @param concept * @param itemLimit Limit applied on the set of distinct items (resources) * //@param rowLimit Limits the number of rows to scan before applying distinct * @return */ default Single<Range<Long>> fetchCount(C concept, Long itemLimit, Long rowLimit) { Single<Range<Long>> result = createPaginator(concept).fetchCount(itemLimit, rowLimit); return result; }
Flowable<Entry<Node, V>> result = listService.createPaginator(concept).apply(null); return result;