List of usage examples for com.mongodb.operation FindOperation FindOperation
public FindOperation(final MongoNamespace namespace, final Decoder<T> decoder)
From source file:mongofx.driver.FindIterable.java
License:Open Source License
private FindOperation<Document> createQueryOperation() { return new FindOperation<>(namespace, codecRegistry.get(Document.class)) .filter(filter.toBsonDocument(Document.class, codecRegistry)).batchSize(findOptions.getBatchSize()) .skip(findOptions.getSkip()).limit(findOptions.getLimit()) .maxTime(findOptions.getMaxTime(MILLISECONDS), MILLISECONDS) .modifiers(toBsonDocument(findOptions.getModifiers())) .projection(toBsonDocument(findOptions.getProjection())).sort(toBsonDocument(findOptions.getSort())) .cursorType(findOptions.getCursorType()).noCursorTimeout(findOptions.isNoCursorTimeout()) .oplogReplay(findOptions.isOplogReplay()).partial(findOptions.isPartial()) .slaveOk(readPreference.isSlaveOk()); }