Fixed two errors introduced during migration to the new API.
Migrated use of Mongo API to 3.x. (Document, Filters, Sorts, etc.)
Part of code moved to separate methods/classes and renamed for readability.
Using Iterables instead of cursors and finds (they mostly took 1-2 docs from DB).
Didn't use Java 7 features, so no need to drop support for Java 6, yet.
Fixed two errors introduced during migration to the new API. Migrated use of Mongo API to 3.x. (Document, Filters, Sorts, etc.) Part of code moved to separate methods/classes and renamed for readability. Using Iterables instead of cursors and finds (they mostly took 1-2 docs from DB). Didn't use Java 7 features, so no need to drop support for Java 6, yet.