public void containsCheckItems() {
StringBuilder sb = new StringBuilder();
Session s = Factory.getSession();
Database currDb = s.getCurrentDatabase();
View contacts = currDb.getView("AllContacts");
ArrayList<String> items = new ArrayList<String>();
items.add("FirstName");
items.add("LastName");
items.add("City");
int count = 0;
for (ViewEntry ent : contacts.getAllEntries()) {
if (ent.getDocument().containsValue("Aurora", items)) {
count += 1;
}
}
sb.append(Integer.toString(count) + " documents contained a value 'Aurora'");
sb.append("..............");
Document testDoc = contacts.getFirstDocument();
if (testDoc.containsKey("Form")) {
sb.append("First doc contains key Form");
} else {
sb.append("First doc does not contain key Form");
}