mongoOps.updateFirst(query(where("name").is("Joe")), update("age", 35),
Person.class);
p = mongoOps.findOne(query(where("name").is("Joe")), Person.class);
log.info("Updated: " + p); // Delete mongoOps.remove(p);
// Check that deletion worked
List<Person> people = mongoOps.findAll(Person.class);
log.info("Number of people = : " + people.size());
// mongoOps.dropCollection(Person.class);
}
}