@Override public GridFSFindIterable find() { return createGridFSFindIterable(null, null); }
@Override public GridFSFindIterable find(final Bson filter) { notNull("filter", filter); return createGridFSFindIterable(null, filter); }
@Override public GridFSFindIterable find(final ClientSession clientSession) { notNull("clientSession", clientSession); return createGridFSFindIterable(clientSession, null); }
@Override public GridFSFindIterable find(final ClientSession clientSession, final Bson filter) { notNull("clientSession", clientSession); notNull("filter", filter); return createGridFSFindIterable(clientSession, filter); }
private GridFSFile getFileByName(@Nullable final ClientSession clientSession, final String filename, final GridFSDownloadOptions options) { int revision = options.getRevision(); int skip; int sort; if (revision >= 0) { skip = revision; sort = 1; } else { skip = (-revision) - 1; sort = -1; } GridFSFile fileInfo = createGridFSFindIterable(clientSession, new Document("filename", filename)).skip(skip) .sort(new Document("uploadDate", sort)).first(); if (fileInfo == null) { throw new MongoGridFSException(format("No file found with the filename: %s and revision: %s", filename, revision)); } return fileInfo; }
@Override public GridFSFindIterable find() { return createGridFSFindIterable(null, null); }
@Override public GridFSFindIterable find() { return createGridFSFindIterable(null, null); }
@Override public GridFSFindIterable find(final ClientSession clientSession) { notNull("clientSession", clientSession); return createGridFSFindIterable(clientSession, null); }
@Override public GridFSFindIterable find(final ClientSession clientSession) { notNull("clientSession", clientSession); return createGridFSFindIterable(clientSession, null); }
@Override public GridFSFindIterable find(final Bson filter) { notNull("filter", filter); return createGridFSFindIterable(null, filter); }
@Override public GridFSFindIterable find(final Bson filter) { notNull("filter", filter); return createGridFSFindIterable(null, filter); }
@Override public GridFSFindIterable find(final ClientSession clientSession, final Bson filter) { notNull("clientSession", clientSession); notNull("filter", filter); return createGridFSFindIterable(clientSession, filter); }
@Override public GridFSFindIterable find(final ClientSession clientSession, final Bson filter) { notNull("clientSession", clientSession); notNull("filter", filter); return createGridFSFindIterable(clientSession, filter); }
private GridFSFile getFileByName(@Nullable final ClientSession clientSession, final String filename, final GridFSDownloadOptions options) { int revision = options.getRevision(); int skip; int sort; if (revision >= 0) { skip = revision; sort = 1; } else { skip = (-revision) - 1; sort = -1; } GridFSFile fileInfo = createGridFSFindIterable(clientSession, new Document("filename", filename)).skip(skip) .sort(new Document("uploadDate", sort)).first(); if (fileInfo == null) { throw new MongoGridFSException(format("No file found with the filename: %s and revision: %s", filename, revision)); } return fileInfo; }
private GridFSFile getFileByName(@Nullable final ClientSession clientSession, final String filename, final GridFSDownloadOptions options) { int revision = options.getRevision(); int skip; int sort; if (revision >= 0) { skip = revision; sort = 1; } else { skip = (-revision) - 1; sort = -1; } GridFSFile fileInfo = createGridFSFindIterable(clientSession, new Document("filename", filename)).skip(skip) .sort(new Document("uploadDate", sort)).first(); if (fileInfo == null) { throw new MongoGridFSException(format("No file found with the filename: %s and revision: %s", filename, revision)); } return fileInfo; }