MongoCollection collection = resolveCollection(collectionName, true);
return collection.validate();
} else if (command.equalsIgnoreCase("findAndModify")) {
String collectionName = query.get(command).toString();
MongoCollection collection = resolveOrCreateCollection(collectionName);
return collection.findAndModify(query);
} else {
log.error("unknown query: {}", query);
}
throw new NoSuchCommandException(command);
}