UniqueEntryStoreStrategy implements IndexStoreStrategy { public Iterable<IndexEntry> queryEntries(Filter filter, String indexName, NodeState indexMeta, Iterable<String> values) { return query0(filter, indexName, indexMeta, values, new HitProducer<IndexEntry>() { @Override public IndexEntry produce(NodeState indexHit, String pathName) { PropertyState s = indexHit.getProperty("entry"); return new IndexEntry(s.getValue(Type.STRING, 0), pathName); } }); } UniqueEntryStoreStrategy();  UniqueEntryStoreStrategy(String indexName);  UniqueEntryStoreStrategy(String indexName, @NotNull Consumer<NodeBuilder> insertCallback); @Override void update(
            Supplier<NodeBuilder> index, String path,
            @Nullable final String indexName,
            @Nullable final NodeBuilder indexMeta,
            Set<String> beforeKeys, Set<String> afterKeys); @Override Iterable<String> query(final Filter filter, final String indexName, 
            final NodeState indexMeta, final Iterable<String> values); Iterable<IndexEntry> queryEntries(Filter filter, String indexName, NodeState indexMeta,
            Iterable<String> values); @Override boolean exists(Supplier<NodeBuilder> index, String key); @Override long count(NodeState root, NodeState indexMeta, Set<String> values, int max); @Override long count(final Filter filter, NodeState root, NodeState indexMeta, Set<String> values, int max); @Override String getIndexNodeName();  }
@Test public void queryEntries_All() { Iterable<IndexEntry> hits = store.queryEntries(FilterImpl.newTestInstance(), indexName, indexMeta.getNodeState(), null); assertThat(hits, containsInAnyOrder(new IndexEntry("/some/node1", "key1"), new IndexEntry("/some/node2", "key2"))); }
@Test public void queryEntries_some() { Iterable<IndexEntry> hits = store.queryEntries(FilterImpl.newTestInstance(), indexName, indexMeta.getNodeState(), Arrays.asList("key1")); assertThat(hits, containsInAnyOrder(new IndexEntry("/some/node1", "key1"))); }
@Test public void queryEntries_none() { Iterable<IndexEntry> hits = store.queryEntries(FilterImpl.newTestInstance(), indexName, indexMeta.getNodeState(), Arrays.asList("key3")); assertThat(hits, iterableWithSize(0)); }