use of org.springframework.data.document.mongodb.query.BasicQuery in project spring-data-document-examples by spring-projects.
the class MvcAnalyticsTest method queryCounterData.
@Test
public void queryCounterData() {
DBObject query = QueryBuilder.start("name").is("SignUpController").get();
for (DBObject dbo : operations.getCollection("counters").find(query)) {
System.out.println(dbo);
}
List<ControllerCounter> counters = operations.find(new BasicQuery("{ 'name' : 'SignUpController'} "), ControllerCounter.class, "counters");
for (ControllerCounter controllerCounter : counters) {
System.out.println(controllerCounter);
}
}
Aggregations