Search in sources :

Example 1 with PartitionPredicateImpl

use of com.hazelcast.query.impl.predicates.PartitionPredicateImpl in project hazelcast by hazelcast.

the class PagingPredicateHolder method asPredicate.

public <K, V> Predicate<K, V> asPredicate(SerializationService serializationService) {
    List<Map.Entry<Integer, Map.Entry<K, V>>> anchorList = anchorDataListHolder.asAnchorList(serializationService);
    Predicate predicate = serializationService.toObject(predicateData);
    Comparator comparator = serializationService.toObject(comparatorData);
    IterationType iterationType = IterationType.getById(iterationTypeId);
    PagingPredicateImpl<K, V> pagingPredicate = new PagingPredicateImpl<K, V>(anchorList, predicate, comparator, pageSize, page, iterationType);
    if (partitionKeyData == null) {
        return pagingPredicate;
    }
    return new PartitionPredicateImpl<>(serializationService.toObject(partitionKeyData), pagingPredicate);
}
Also used : IterationType(com.hazelcast.internal.util.IterationType) PartitionPredicateImpl(com.hazelcast.query.impl.predicates.PartitionPredicateImpl) AbstractMap(java.util.AbstractMap) Map(java.util.Map) PartitionPredicate(com.hazelcast.query.PartitionPredicate) Predicate(com.hazelcast.query.Predicate) Comparator(java.util.Comparator) PagingPredicateImpl(com.hazelcast.query.impl.predicates.PagingPredicateImpl)

Aggregations

IterationType (com.hazelcast.internal.util.IterationType)1 PartitionPredicate (com.hazelcast.query.PartitionPredicate)1 Predicate (com.hazelcast.query.Predicate)1 PagingPredicateImpl (com.hazelcast.query.impl.predicates.PagingPredicateImpl)1 PartitionPredicateImpl (com.hazelcast.query.impl.predicates.PartitionPredicateImpl)1 AbstractMap (java.util.AbstractMap)1 Comparator (java.util.Comparator)1 Map (java.util.Map)1