@Test public void example() { QuerySearchExample.example(); }
public static void example() { SearchableCache<Integer, SimpleObject> cache = CacheBuilder.heapCache() .addIndex("j", IndexType.RANGE_INDEX) .build(); cache.put(0, createObject(1, 1)); cache.put(1, createObject(2, 2)); cache.put(2, createObject(3, 3)); List<SimpleObject> objects = cache .execute(CacheQuery.newQuery() .setCriteria(new BetweenCriteria("j", 1, 3).or(new ETCriteria("j", 3))) .setFilter(new LTFilter("k", 3))); for (SimpleObject simpleObject : objects) { System.out.println(simpleObject); } }
QuerySearchExample { public static void example() { SearchableCache<Integer, SimpleObject> cache = CacheBuilder.heapCache() .addIndex("j", IndexType.RANGE_INDEX) .build(); cache.put(0, createObject(1, 1)); cache.put(1, createObject(2, 2)); cache.put(2, createObject(3, 3)); List<SimpleObject> objects = cache .execute(CacheQuery.newQuery() .setCriteria(new BetweenCriteria("j", 1, 3).or(new ETCriteria("j", 3))) .setFilter(new LTFilter("k", 3))); for (SimpleObject simpleObject : objects) { System.out.println(simpleObject); } } }
QuerySearchExample { public static void example() { SearchableCache<Integer, SimpleObject> cache = CacheBuilder.heapCache() .addIndex("j", IndexType.RANGE_INDEX) .build(); cache.put(0, createObject(1, 1)); cache.put(1, createObject(2, 2)); cache.put(2, createObject(3, 3)); List<SimpleObject> objects = cache .execute(CacheQuery.newQuery() .setCriteria(new BetweenCriteria("j", 1, 3).or(new ETCriteria("j", 3))) .setFilter(new LTFilter("k", 3))); for (SimpleObject simpleObject : objects) { System.out.println(simpleObject); } }  }
QuerySearchExample { public static void example() { SearchableCache<Integer, SimpleObject> cache = CacheBuilder.heapCache() .addIndex("j", IndexType.RANGE_INDEX) .build(); cache.put(0, createObject(1, 1)); cache.put(1, createObject(2, 2)); cache.put(2, createObject(3, 3)); List<SimpleObject> objects = cache .execute(CacheQuery.newQuery() .setCriteria(new BetweenCriteria("j", 1, 3).or(new ETCriteria("j", 3))) .setFilter(new LTFilter("k", 3))); for (SimpleObject simpleObject : objects) { System.out.println(simpleObject); } }  static void example(); static void main(String[] args); }
QuerySearchExample { public static void example() { SearchableCache<Integer, SimpleObject> cache = CacheBuilder.heapCache() .addIndex("j", IndexType.RANGE_INDEX) .build(); cache.put(0, createObject(1, 1)); cache.put(1, createObject(2, 2)); cache.put(2, createObject(3, 3)); List<SimpleObject> objects = cache .execute(CacheQuery.newQuery() .setCriteria(new BetweenCriteria("j", 1, 3).or(new ETCriteria("j", 3))) .setFilter(new LTFilter("k", 3))); for (SimpleObject simpleObject : objects) { System.out.println(simpleObject); } }  static void example(); static void main(String[] args);  }