final Comparator<Entry> comparator = SortingUtil.newComparator(pagingPredicate.getComparator(), IterationType.KEY);
final SortedQueryResultSet sortedResult = new SortedQueryResultSet(comparator, IterationType.KEY,
pagingPredicate.getPageSize());
final Iterator<Entry> iterator = result.rawIterator();
while (iterator.hasNext()) {
final Entry entry = iterator.next();
final K key = toObject(entry.getKey());
final V value = toObject(entry.getValue());
sortedResult.add(new AbstractMap.SimpleImmutableEntry<K, V>(key, value));