/** * Gets the sort criteria to apply to the query. The default is null, which means that the documents will be returned in an undefined * order. * * @return a document describing the sort criteria * @mongodb.driver.manual reference/method/cursor.sort/ Sort */ DBObject getSortDBObject() { return options.getSort(); }
assertEquals(45, options.getMaxAwaitTime(TimeUnit.SECONDS)); assertEquals(12, options.getSkip()); assertEquals(new BasicDBObject("field", -1), options.getSort()); assertEquals(CursorType.TailableAwait, options.getCursorType()); assertTrue(options.isNoCursorTimeout());
.modifiers(collection.wrapAllowNull(findOptions.getModifiers())) .projection(collection.wrapAllowNull(findOptions.getProjection())) .sort(collection.wrapAllowNull(findOptions.getSort())) .collation(findOptions.getCollation()) .comment(findOptions.getComment())
/** * Gets the sort criteria to apply to the query. The default is null, which means that the documents will be returned in an undefined * order. * * @return a document describing the sort criteria * @mongodb.driver.manual reference/method/cursor.sort/ Sort */ DBObject getSortDBObject() { return options.getSort(); }
.modifiers(collection.wrapAllowNull(findOptions.getModifiers())) .projection(collection.wrapAllowNull(findOptions.getProjection())) .sort(collection.wrapAllowNull(findOptions.getSort())) .collation(findOptions.getCollation()) .comment(findOptions.getComment())