SerializerProvider serializerProvider, JsonSerializer serializer,
DBQuery.Query query) {
DBObject serializedQuery = new BasicDBObject();
for (Map.Entry<String, QueryCondition> field : query.conditions()) {
String key = field.getKey();
QueryCondition condition = field.getValue();
serializedQuery.put(
key,
serializeQueryCondition(serializerProvider, serializer,
key, condition));
}