@Test public void testFieldWithValue() { Multimap<Column, RecordValue<?>> values = ArrayListMultimap.create(); values.put(new Column("field1"), RecordValue.create("Value1", new ColumnVisibility("viz1"))); MultimapRecord doc = new MultimapRecord(values,"abc",new ColumnVisibility("viz1")); DocumentFieldPredicate filter = new DocumentFieldPredicate(new Field("field1"),new Literal("Value1")); assertTrue( filter.apply(doc) ); }
@Override public boolean apply(MultimapRecord input) { Collection<RecordValue<?>> values = input.get(column); for (RecordValue<?> value : values) { if (value.value().equals(predicateValue.toString())) return true; } return false; }
DocumentFieldPredicate implements Predicate<MultimapRecord> { @Override public boolean apply(MultimapRecord input) { Collection<RecordValue<?>> values = input.get(column); for (RecordValue<?> value : values) { if (value.value().equals(predicateValue.toString())) return true; } return false; } }
DocumentFieldPredicate implements Predicate<MultimapRecord> { @Override public boolean apply(MultimapRecord input) { Collection<RecordValue<?>> values = input.get(column); for (RecordValue<?> value : values) { if (value.value().equals(predicateValue.toString())) return true; } return false; } DocumentFieldPredicate(Field field, Literal value); }
DocumentFieldPredicate implements Predicate<MultimapRecord> { @Override public boolean apply(MultimapRecord input) { Collection<RecordValue<?>> values = input.get(column); for (RecordValue<?> value : values) { if (value.value().equals(predicateValue.toString())) return true; } return false; } DocumentFieldPredicate(Field field, Literal value); @Override boolean apply(MultimapRecord input); }
DocumentFieldPredicate implements Predicate<MultimapRecord> { @Override public boolean apply(MultimapRecord input) { Collection<RecordValue<?>> values = input.get(column); for (RecordValue<?> value : values) { if (value.value().equals(predicateValue.toString())) return true; } return false; } DocumentFieldPredicate(Field field, Literal value); @Override boolean apply(MultimapRecord input);  }