use of org.infinispan.query.dsl.QueryBuilder in project indy by Commonjava.
the class FoloRecordCache method inProgressByTrackingKey.
private <R> R inProgressByTrackingKey(final TrackingKey key, final BiFunction<QueryBuilder, CacheHandle<TrackedContentEntry, TrackedContentEntry>, R> operation) {
return inProgressRecordCache.execute((cache) -> {
QueryFactory queryFactory = Search.getQueryFactory(cache);
QueryBuilder qb = queryFactory.from(TrackedContentEntry.class).having("trackingKey.id").eq(key.getId()).toBuilder();
return operation.apply(qb, inProgressRecordCache);
});
}
Aggregations