/** * Sets the collation * * @param collation the collation * @return this * @mongodb.server.release 3.4 */ public CountOptions collation(final Collation collation) { options.collation(collation); return this; }
private DBCollectionCountOptions getDbCollectionCountOptions() { DBCollectionCountOptions countOptions = new DBCollectionCountOptions() .readPreference(getReadPreferenceForCursor()) .readConcern(getReadConcern()) .collation(getCollation()) .maxTime(findOptions.getMaxTime(MILLISECONDS), MILLISECONDS); Object hint = findOptions.getHint() != null ? findOptions.getHint() : findOptions.getModifiers().get("$hint"); if (hint != null) { if (hint instanceof String) { countOptions.hintString((String) hint); } else { countOptions.hint((DBObject) hint); } } return countOptions; } }
/** * Sets the collation * * @param collation the collation * @return this * @mongodb.server.release 3.4 */ public CountOptions collation(final Collation collation) { options.collation(collation); return this; }
private DBCollectionCountOptions getDbCollectionCountOptions() { DBCollectionCountOptions countOptions = new DBCollectionCountOptions() .readPreference(getReadPreferenceForCursor()) .readConcern(getReadConcern()) .collation(getCollation()) .maxTime(findOptions.getMaxTime(MILLISECONDS), MILLISECONDS); Object hint = findOptions.getHint() != null ? findOptions.getHint() : findOptions.getModifiers().get("$hint"); if (hint != null) { if (hint instanceof String) { countOptions.hintString((String) hint); } else { countOptions.hint((DBObject) hint); } } return countOptions; } }