Package | Description |
---|---|
com.mongodb |
The core mongodb package
|
com.mongodb.client.model |
This package contains models and options that help describe MongoCollection operations
|
com.mongodb.gridfs |
Contains the classes for supporting MongoDB's specification for storing very large files, GridFS.
|
Modifier and Type | Class and Description |
---|---|
class |
BasicDBList
An implementation of List that reflects the way BSON lists work.
|
class |
BasicDBObject
A basic implementation of BSON object that is MongoDB specific.
|
class |
CommandResult
A simple wrapper to hold the result of a command.
|
class |
LazyDBList
A
LazyDBObject representing a BSON array. |
class |
LazyDBObject
An immutable
DBObject backed by a byte buffer that lazily provides keys and values on request. |
class |
ReflectionDBObject
This class enables to map simple Class fields to a BSON object fields
|
Modifier and Type | Field and Description |
---|---|
private DBObject |
QueryBuilder._query |
private DBObject |
MapReduceOutput.command |
private DBObject |
GroupCommand.condition |
private DBObject |
DBCursor.currentObject |
private DBObject |
WriteConcernError.details |
private DBObject |
BulkWriteError.details |
private DBObject |
ReplaceRequest.document |
private DBObject |
InsertRequest.document |
private DBObject |
DBCursor.filter |
private DBObject |
GroupCommand.initial |
private DBObject |
GroupCommand.keys |
private DBObject |
MapReduceCommand.query |
private DBObject |
BulkWriteRequestBuilder.query |
private DBObject |
BulkUpdateRequestBuilder.query |
private DBObject |
RemoveRequest.query |
private DBObject |
ReplaceRequest.query |
private DBObject |
UpdateRequest.query |
private DBObject |
MapReduceCommand.sort |
private DBObject |
UpdateRequest.update |
Modifier and Type | Field and Description |
---|---|
private java.util.LinkedList<DBObject> |
BasicDBObjectBuilder._stack |
private java.util.List<DBObject> |
DBCursor.all |
private java.util.List<? extends DBObject> |
BulkUpdateRequestBuilder.arrayFilters |
private java.util.List<? extends DBObject> |
UpdateRequest.arrayFilters |
(package private) java.lang.Class<? extends DBObject> |
ReflectionDBObject.FieldInfo.clazz |
private Encoder<DBObject> |
BulkWriteRequestBuilder.codec |
private Encoder<DBObject> |
RemoveRequest.codec |
private Encoder<DBObject> |
ReplaceRequest.codec |
private Encoder<DBObject> |
UpdateRequest.codec |
private Encoder<DBObject> |
InsertRequest.codec |
private Codec<DBObject> |
DB.commandCodec |
private MongoCursor<DBObject> |
DBCursor.cursor |
private MongoCursor<DBObject> |
MongoCursorAdapter.cursor |
private Decoder<DBObject> |
CompoundDBObjectCodec.decoder |
private Decoder<DBObject> |
DBCursor.decoder |
private Encoder<DBObject> |
CompoundDBObjectCodec.encoder |
private java.util.List<DBObject> |
DBCollection.hintFields |
private java.util.List<DBObject> |
MapReduceOutput.inlineResults |
private java.util.Map<java.util.List<java.lang.String>,java.lang.Class<? extends DBObject>> |
DBCollectionObjectFactory.pathToClassMap |
private Encoder<DBObject> |
BulkUpdateRequestBuilder.queryCodec |
private Encoder<DBObject> |
BulkWriteRequestBuilder.replacementCodec |
private Encoder<DBObject> |
BulkUpdateRequestBuilder.replacementCodec |
private Encoder<DBObject> |
ReplaceRequest.replacementCodec |
private java.util.List<DBObject> |
AggregationOutput.results
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
private DBObject |
BasicDBObjectBuilder._cur() |
DBObject |
DBCursor.curr()
Returns the element the cursor is at.
|
private DBObject |
DBCursor.currentObject(DBObject newCurrentObject) |
DBObject |
DBDecoderAdapter.decode(BsonReader reader,
DecoderContext decoderContext) |
DBObject |
CompoundDBObjectCodec.decode(BsonReader reader,
DecoderContext decoderContext) |
DBObject |
DBObjectCodec.decode(BsonReader reader,
DecoderContext decoderContext) |
DBObject |
DefaultDBDecoder.decode(byte[] bytes,
DBCollection collection) |
DBObject |
DBDecoder.decode(byte[] bytes,
DBCollection collection)
Decode a single DBObject belonging to the given collection from the given array of bytes.
|
DBObject |
LazyDBDecoder.decode(byte[] bytes,
DBCollection collection) |
DBObject |
DefaultDBDecoder.decode(java.io.InputStream input,
DBCollection collection) |
DBObject |
DBDecoder.decode(java.io.InputStream input,
DBCollection collection)
Decode a single DBObject belonging to the given collection from the given input stream.
|
DBObject |
LazyDBDecoder.decode(java.io.InputStream input,
DBCollection collection) |
DBObject |
DBCursor.explain()
Returns an object containing basic information about the execution of the query that created this cursor.
|
DBObject |
DBCollection.findAndModify(DBObject query,
DBCollectionFindAndModifyOptions options)
Atomically modify and return a single document.
|
DBObject |
DBCollection.findAndModify(DBObject query,
DBObject update)
Atomically modify and return a single document.
|
DBObject |
DBCollection.findAndModify(DBObject query,
DBObject sort,
DBObject update)
Atomically modify and return a single document.
|
DBObject |
DBCollection.findAndModify(DBObject query,
DBObject fields,
DBObject sort,
boolean remove,
DBObject update,
boolean returnNew,
boolean upsert)
Atomically modify and return a single document.
|
DBObject |
DBCollection.findAndModify(DBObject query,
DBObject fields,
DBObject sort,
boolean remove,
DBObject update,
boolean returnNew,
boolean upsert,
boolean bypassDocumentValidation,
long maxTime,
java.util.concurrent.TimeUnit maxTimeUnit)
Atomically modify and return a single document.
|
DBObject |
DBCollection.findAndModify(DBObject query,
DBObject fields,
DBObject sort,
boolean remove,
DBObject update,
boolean returnNew,
boolean upsert,
boolean bypassDocumentValidation,
long maxTime,
java.util.concurrent.TimeUnit maxTimeUnit,
WriteConcern writeConcern)
Atomically modify and return a single document.
|
DBObject |
DBCollection.findAndModify(DBObject query,
DBObject fields,
DBObject sort,
boolean remove,
DBObject update,
boolean returnNew,
boolean upsert,
long maxTime,
java.util.concurrent.TimeUnit maxTimeUnit)
Atomically modify and return a single document.
|
DBObject |
DBCollection.findAndModify(DBObject query,
DBObject fields,
DBObject sort,
boolean remove,
DBObject update,
boolean returnNew,
boolean upsert,
long maxTime,
java.util.concurrent.TimeUnit maxTimeUnit,
WriteConcern writeConcern)
Atomically modify and return a single document.
|
DBObject |
DBCollection.findAndModify(DBObject query,
DBObject fields,
DBObject sort,
boolean remove,
DBObject update,
boolean returnNew,
boolean upsert,
WriteConcern writeConcern)
Atomically modify and return a single document.
|
DBObject |
DBCollection.findAndRemove(DBObject query)
Atomically remove and return a single document.
|
DBObject |
DBCollection.findOne()
Get a single document from collection.
|
DBObject |
DBCollection.findOne(DBObject query)
Get a single document from collection.
|
DBObject |
DBCollection.findOne(DBObject query,
DBCollectionFindOptions findOptions)
Get a single document from collection.
|
DBObject |
DBCollection.findOne(DBObject query,
DBObject projection)
Get a single document from collection.
|
DBObject |
DBCollection.findOne(DBObject query,
DBObject projection,
DBObject sort)
Get a single document from collection.
|
DBObject |
DBCollection.findOne(DBObject query,
DBObject projection,
DBObject sort,
ReadPreference readPreference)
Get a single document from collection.
|
DBObject |
DBCollection.findOne(DBObject query,
DBObject projection,
ReadPreference readPreference)
Get a single document from collection.
|
DBObject |
DBCollection.findOne(java.lang.Object id)
Get a single document from collection by '_id'.
|
DBObject |
DBCollection.findOne(java.lang.Object id,
DBObject projection)
Get a single document from collection by '_id'.
|
DBObject |
DBObjectCodec.generateIdIfAbsentFromDocument(DBObject document) |
DBObject |
QueryBuilder.get()
Creates a
DBObject query to be used for the driver's find operations |
DBObject |
BasicDBObjectBuilder.get()
Gets the top level document.
|
DBObject |
MapReduceOutput.getCommand()
Get the original command that was sent to the database.
|
DBObject |
WriteConcernError.getDetails()
Gets the details associated with this error.
|
DBObject |
BulkWriteError.getDetails()
Gets the details associated with this error.
|
DBObject |
ReplaceRequest.getDocument() |
DBObject |
InsertRequest.getDocument() |
DBObject |
BasicDBObjectFactory.getInstance() |
DBObject |
DBCollectionObjectFactory.getInstance() |
DBObject |
DBObjectFactory.getInstance() |
DBObject |
BasicDBObjectFactory.getInstance(java.util.List<java.lang.String> path) |
DBObject |
DBCollectionObjectFactory.getInstance(java.util.List<java.lang.String> path) |
DBObject |
DBObjectFactory.getInstance(java.util.List<java.lang.String> path) |
DBObject |
DBCursor.getKeysWanted()
Gets the fields to be returned.
|
DBObject |
MapReduceCommand.getQuery()
Gets the query to run for this MapReduce job
|
DBObject |
DBCursor.getQuery()
Gets the query.
|
DBObject |
RemoveRequest.getQuery() |
DBObject |
ReplaceRequest.getQuery() |
DBObject |
UpdateRequest.getQuery() |
DBObject |
MapReduceCommand.getSort()
Gets the (optional) sort specification object
|
DBObject |
UpdateRequest.getUpdate() |
DBObject |
DBCollection.group(DBObject key,
DBObject cond,
DBObject initial,
java.lang.String reduce)
Group documents in a collection by the specified key and performs simple aggregation functions such as computing counts and sums.
|
DBObject |
DBCollection.group(DBObject key,
DBObject cond,
DBObject initial,
java.lang.String reduce,
java.lang.String finalize)
Group documents in a collection by the specified key and performs simple aggregation functions such as computing counts and sums.
|
DBObject |
DBCollection.group(DBObject key,
DBObject cond,
DBObject initial,
java.lang.String reduce,
java.lang.String finalize,
ReadPreference readPreference)
Group documents in a collection by the specified key and performs simple aggregation functions such as computing counts and sums.
|
DBObject |
DBCollection.group(GroupCommand cmd)
Group documents in a collection by the specified key and performs simple aggregation functions such as computing counts and sums.
|
DBObject |
DBCollection.group(GroupCommand cmd,
ReadPreference readPreference)
Group documents in a collection by the specified key and performs simple aggregation functions such as computing counts and sums.
|
private static DBObject |
DBCursor.lookupSuitableHints(DBObject query,
java.util.List<DBObject> hints) |
DBObject |
DBCursor.next()
Returns the object the cursor is at and moves the cursor ahead by one.
|
DBObject |
MongoCursorAdapter.next() |
private DBObject |
DBCursor.nextInternal() |
DBObject |
DBCursor.one()
Returns the first document that matches the query.
|
private DBObject |
DBObjectCodec.readDocument(BsonReader reader,
DecoderContext decoderContext,
java.util.List<java.lang.String> path) |
DBObject |
LazyDBDecoder.readObject(java.io.InputStream in) |
DBObject |
MapReduceCommand.toDBObject()
Turns this command into a DBObject representation of this map reduce command.
|
DBObject |
GroupCommand.toDBObject()
Turns this group command into the DBObject format of the command.
|
static DBObject |
DBObjects.toDBObject(BsonDocument document) |
DBObject |
DBCursor.tryNext()
Non blocking check for tailable cursors to see if another object is available.
|
DBObject |
Mongo.unlock()
Unlocks the database, allowing the write operations to go through.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<? extends DBObject> |
BulkUpdateRequestBuilder.getArrayFilters()
Gets the array filters to apply to the update operation
|
java.util.List<? extends DBObject> |
UpdateRequest.getArrayFilters() |
(package private) java.lang.Class<? extends DBObject> |
DBCollectionObjectFactory.getClassForPath(java.util.List<java.lang.String> path) |
Decoder<DBObject> |
CompoundDBObjectCodec.getDecoder() |
Encoder<DBObject> |
CompoundDBObjectCodec.getEncoder() |
java.lang.Class<DBObject> |
DBEncoderAdapter.getEncoderClass() |
java.lang.Class<DBObject> |
DBEncoderFactoryAdapter.getEncoderClass() |
java.lang.Class<DBObject> |
CompoundDBObjectCodec.getEncoderClass() |
java.lang.Class<DBObject> |
DBObjectCodec.getEncoderClass() |
java.util.List<DBObject> |
DBCollection.getHintFields()
Get hint fields for this collection (used to optimize queries).
|
java.util.List<DBObject> |
DBCollection.getIndexInfo()
Return a list of the indexes for this collection.
|
(package private) java.lang.Class<? extends DBObject> |
ReflectionDBObject.JavaWrapper.getInternalClass(java.util.List<java.lang.String> path) |
protected java.lang.Class<? extends DBObject> |
DBCollection.getInternalClass(java.lang.String path)
Gets the internal class for the given path in the document hierarchy
|
(package private) Codec<DBObject> |
DBCollection.getObjectCodec() |
private FindOperation<DBObject> |
DBCursor.getQueryOperation(Decoder<DBObject> decoder) |
java.util.Iterator<DBObject> |
DBCursor.iterator()
Creates a copy of this cursor object that can be iterated.
|
java.lang.Iterable<DBObject> |
AggregationOutput.results()
Deprecated.
Returns the results of the aggregation.
|
java.lang.Iterable<DBObject> |
MapReduceOutput.results()
Returns an iterable containing the results of the operation.
|
java.util.List<DBObject> |
DBCursor.toArray()
Converts this cursor to an array.
|
java.util.List<DBObject> |
DBCursor.toArray(int max)
Converts this cursor to an array.
|
private Encoder<DBObject> |
DBCollection.toEncoder(DBEncoder dbEncoder) |
(package private) GroupOperation<DBObject> |
GroupCommand.toOperation(MongoNamespace namespace,
DBObjectCodec codec) |
private java.util.Map<java.util.List<java.lang.String>,java.lang.Class<? extends DBObject>> |
DBCollectionObjectFactory.updatePathToClassMap(java.lang.Class<? extends DBObject> aClass,
java.util.List<java.lang.String> path) |
Modifier and Type | Method and Description |
---|---|
AggregationOutput |
DBCollection.aggregate(DBObject firstOp,
DBObject... additionalOps)
Deprecated.
Use
DBCollection.aggregate(List, AggregationOptions) instead |
AggregationOutput |
DBCollection.aggregate(DBObject firstOp,
DBObject... additionalOps)
Deprecated.
Use
DBCollection.aggregate(List, AggregationOptions) instead |
QueryBuilder |
QueryBuilder.and(DBObject... ands)
Equivalent to an $and operand
|
private void |
DBObjectCodec.beforeFields(BsonWriter bsonWriter,
EncoderContext encoderContext,
DBObject document) |
CommandResult |
DB.command(DBObject command)
Executes a database command.
|
CommandResult |
DB.command(DBObject command,
DBEncoder encoder)
Executes a database command.
|
CommandResult |
DB.command(DBObject command,
ReadPreference readPreference)
Executes the command against the database with the given read preference.
|
CommandResult |
DB.command(DBObject command,
ReadPreference readPreference,
DBEncoder encoder)
Executes a database command with the selected readPreference, and encodes the command using the given encoder.
|
private <T> T |
DBCollection.convertOptionsToType(DBObject options,
java.lang.String field,
java.lang.Class<T> clazz) |
long |
DBCollection.count(DBObject query)
Same as
DBCollection.getCount(DBObject) |
long |
DBCollection.count(DBObject query,
DBCollectionCountOptions options)
Get the count of documents in collection that would match a criteria.
|
long |
DBCollection.count(DBObject query,
ReadPreference readPreference)
Get the count of documents in collection that would match a criteria.
|
(package private) static Collation |
DBObjectCollationHelper.createCollationFromOptions(DBObject options) |
DBCollection |
DB.createCollection(java.lang.String collectionName,
DBObject options)
Creates a collection with a given name and options.
|
void |
DBCollection.createIndex(DBObject keys)
Creates an index on the field specified, if that index does not already exist.
|
void |
DBCollection.createIndex(DBObject keys,
DBObject options)
Creates an index on the field specified, if that index does not already exist.
|
void |
DBCollection.createIndex(DBObject keys,
java.lang.String name)
Forces creation of an index on a set of fields, if one does not already exist.
|
void |
DBCollection.createIndex(DBObject keys,
java.lang.String name,
boolean unique)
Forces creation of an index on a set of fields, if one does not already exist.
|
private CreateIndexesOperation |
DBCollection.createIndexOperation(DBObject key,
DBObject options) |
private DBObject |
DBCursor.currentObject(DBObject newCurrentObject) |
java.util.List |
DBCollection.distinct(java.lang.String fieldName,
DBObject query)
Find the distinct values for a specified field across a collection and returns the results in an array.
|
java.util.List |
DBCollection.distinct(java.lang.String fieldName,
DBObject query,
ReadPreference readPreference)
Find the distinct values for a specified field across a collection and returns the results in an array.
|
boolean |
DBObjectCodec.documentHasId(DBObject document) |
void |
DBCollection.dropIndex(DBObject index)
Drops an index from this collection.
|
QueryBuilder |
QueryBuilder.elemMatch(DBObject match)
Equivalent to the $elemMatch operand
|
void |
DBEncoderAdapter.encode(BsonWriter writer,
DBObject document,
EncoderContext encoderContext) |
void |
DBEncoderFactoryAdapter.encode(BsonWriter writer,
DBObject value,
EncoderContext encoderContext) |
void |
CompoundDBObjectCodec.encode(BsonWriter writer,
DBObject value,
EncoderContext encoderContext) |
void |
DBObjectCodec.encode(BsonWriter writer,
DBObject document,
EncoderContext encoderContext) |
BulkWriteRequestBuilder |
BulkWriteOperation.find(DBObject query)
Start building a write request to add to the bulk write operation.
|
DBCursor |
DBCollection.find(DBObject query)
Select documents in collection and get a cursor to the selected documents.
|
DBCursor |
DBCollection.find(DBObject query,
DBCollectionFindOptions options)
Select documents in collection and get a cursor to the selected documents.
|
DBCursor |
DBCollection.find(DBObject query,
DBObject projection)
Select documents in collection and get a cursor to the selected documents.
|
DBCursor |
DBCollection.find(DBObject query,
DBObject projection,
int numToSkip,
int batchSize)
Deprecated.
use
DBCursor.skip(int) and DBCursor.batchSize(int) on the DBCursor
returned from DBCollection.find(DBObject, DBObject) |
DBCursor |
DBCollection.find(DBObject query,
DBObject projection,
int numToSkip,
int batchSize,
int options)
Deprecated.
use
DBCursor.skip(int) , DBCursor.batchSize(int) and DBCursor.setOptions(int) on the DBCursor returned from DBCollection.find(DBObject,
DBObject) |
DBObject |
DBCollection.findAndModify(DBObject query,
DBCollectionFindAndModifyOptions options)
Atomically modify and return a single document.
|
DBObject |
DBCollection.findAndModify(DBObject query,
DBObject update)
Atomically modify and return a single document.
|
DBObject |
DBCollection.findAndModify(DBObject query,
DBObject sort,
DBObject update)
Atomically modify and return a single document.
|
DBObject |
DBCollection.findAndModify(DBObject query,
DBObject fields,
DBObject sort,
boolean remove,
DBObject update,
boolean returnNew,
boolean upsert)
Atomically modify and return a single document.
|
DBObject |
DBCollection.findAndModify(DBObject query,
DBObject fields,
DBObject sort,
boolean remove,
DBObject update,
boolean returnNew,
boolean upsert,
boolean bypassDocumentValidation,
long maxTime,
java.util.concurrent.TimeUnit maxTimeUnit)
Atomically modify and return a single document.
|
DBObject |
DBCollection.findAndModify(DBObject query,
DBObject fields,
DBObject sort,
boolean remove,
DBObject update,
boolean returnNew,
boolean upsert,
boolean bypassDocumentValidation,
long maxTime,
java.util.concurrent.TimeUnit maxTimeUnit,
WriteConcern writeConcern)
Atomically modify and return a single document.
|
DBObject |
DBCollection.findAndModify(DBObject query,
DBObject fields,
DBObject sort,
boolean remove,
DBObject update,
boolean returnNew,
boolean upsert,
long maxTime,
java.util.concurrent.TimeUnit maxTimeUnit)
Atomically modify and return a single document.
|
DBObject |
DBCollection.findAndModify(DBObject query,
DBObject fields,
DBObject sort,
boolean remove,
DBObject update,
boolean returnNew,
boolean upsert,
long maxTime,
java.util.concurrent.TimeUnit maxTimeUnit,
WriteConcern writeConcern)
Atomically modify and return a single document.
|
DBObject |
DBCollection.findAndModify(DBObject query,
DBObject fields,
DBObject sort,
boolean remove,
DBObject update,
boolean returnNew,
boolean upsert,
WriteConcern writeConcern)
Atomically modify and return a single document.
|
DBObject |
DBCollection.findAndRemove(DBObject query)
Atomically remove and return a single document.
|
DBObject |
DBCollection.findOne(DBObject query)
Get a single document from collection.
|
DBObject |
DBCollection.findOne(DBObject query,
DBCollectionFindOptions findOptions)
Get a single document from collection.
|
DBObject |
DBCollection.findOne(DBObject query,
DBObject projection)
Get a single document from collection.
|
DBObject |
DBCollection.findOne(DBObject query,
DBObject projection,
DBObject sort)
Get a single document from collection.
|
DBObject |
DBCollection.findOne(DBObject query,
DBObject projection,
DBObject sort,
ReadPreference readPreference)
Get a single document from collection.
|
DBObject |
DBCollection.findOne(DBObject query,
DBObject projection,
ReadPreference readPreference)
Get a single document from collection.
|
DBObject |
DBCollection.findOne(java.lang.Object id,
DBObject projection)
Get a single document from collection by '_id'.
|
DBObject |
DBObjectCodec.generateIdIfAbsentFromDocument(DBObject document) |
(package private) ReadPreference |
DB.getCommandReadPreference(DBObject command,
ReadPreference requestedPreference)
Determines the read preference that should be used for the given command.
|
long |
DBCollection.getCount(DBObject query)
Get the count of documents in collection that would match a criteria.
|
long |
DBCollection.getCount(DBObject query,
DBCollectionCountOptions options)
Get the count of documents in collection that would match a criteria.
|
long |
DBCollection.getCount(DBObject query,
DBObject projection)
Get the count of documents in collection that would match a criteria.
|
long |
DBCollection.getCount(DBObject query,
DBObject projection,
long limit,
long skip)
Get the count of documents in collection that would match a criteria.
|
long |
DBCollection.getCount(DBObject query,
DBObject projection,
long limit,
long skip,
ReadPreference readPreference)
Get the count of documents in collection that would match a criteria.
|
long |
DBCollection.getCount(DBObject query,
DBObject projection,
ReadPreference readPreference)
Get the count of documents in collection that would match a criteria.
|
private CreateCollectionOperation |
DB.getCreateCollectionOperation(java.lang.String collectionName,
DBObject options) |
BsonValue |
DBObjectCodec.getDocumentId(DBObject document) |
private java.lang.String |
DBCollection.getIndexNameFromIndexFields(DBObject index) |
DBObject |
DBCollection.group(DBObject key,
DBObject cond,
DBObject initial,
java.lang.String reduce)
Group documents in a collection by the specified key and performs simple aggregation functions such as computing counts and sums.
|
DBObject |
DBCollection.group(DBObject key,
DBObject cond,
DBObject initial,
java.lang.String reduce,
java.lang.String finalize)
Group documents in a collection by the specified key and performs simple aggregation functions such as computing counts and sums.
|
DBObject |
DBCollection.group(DBObject key,
DBObject cond,
DBObject initial,
java.lang.String reduce,
java.lang.String finalize,
ReadPreference readPreference)
Group documents in a collection by the specified key and performs simple aggregation functions such as computing counts and sums.
|
DBCursor |
DBCursor.hint(DBObject indexKeys)
Informs the database of indexed fields of the collection in order to improve performance.
|
WriteResult |
DBCollection.insert(DBObject... documents)
Insert documents into a collection.
|
void |
BulkWriteOperation.insert(DBObject document)
Add an insert request to the bulk operation
|
WriteResult |
DBCollection.insert(DBObject[] documents,
WriteConcern writeConcern)
Insert documents into a collection.
|
WriteResult |
DBCollection.insert(DBObject[] documents,
WriteConcern aWriteConcern,
DBEncoder encoder)
Insert documents into a collection.
|
WriteResult |
DBCollection.insert(DBObject document,
WriteConcern writeConcern)
Insert a document into a collection.
|
WriteResult |
DBCollection.insert(WriteConcern writeConcern,
DBObject... documents)
Insert documents into a collection.
|
private static DBObject |
DBCursor.lookupSuitableHints(DBObject query,
java.util.List<DBObject> hints) |
MapReduceOutput |
DBCollection.mapReduce(java.lang.String map,
java.lang.String reduce,
java.lang.String outputTarget,
DBObject query)
Allows you to run map-reduce aggregation operations over a collection.
|
MapReduceOutput |
DBCollection.mapReduce(java.lang.String map,
java.lang.String reduce,
java.lang.String outputTarget,
MapReduceCommand.OutputType outputType,
DBObject query)
Allows you to run map-reduce aggregation operations over a collection and saves to a named collection.
|
MapReduceOutput |
DBCollection.mapReduce(java.lang.String map,
java.lang.String reduce,
java.lang.String outputTarget,
MapReduceCommand.OutputType outputType,
DBObject query,
ReadPreference readPreference)
Allows you to run map-reduce aggregation operations over a collection and saves to a named collection.
|
DBCursor |
DBCursor.max(DBObject max)
Specifies an exclusive upper limit for the index to use in a query.
|
DBCursor |
DBCursor.min(DBObject min)
Specifies an inclusive lower limit for the index to use in a query.
|
QueryBuilder |
QueryBuilder.or(DBObject... ors)
Equivalent to an $or operand
|
WriteResult |
DBCollection.remove(DBObject query)
Remove documents from a collection.
|
WriteResult |
DBCollection.remove(DBObject query,
DBCollectionRemoveOptions options)
Remove documents from a collection.
|
WriteResult |
DBCollection.remove(DBObject query,
WriteConcern writeConcern)
Remove documents from a collection.
|
WriteResult |
DBCollection.remove(DBObject query,
WriteConcern writeConcern,
DBEncoder encoder)
Remove documents from a collection.
|
void |
BulkWriteRequestBuilder.replaceOne(DBObject document)
Adds a request to replace one document in the collection that matches the query with which this builder was created.
|
void |
BulkUpdateRequestBuilder.replaceOne(DBObject document)
Adds a request to replace one document in the collection that matches the query with which this builder was created.
|
private WriteResult |
DBCollection.replaceOrInsert(DBObject obj,
java.lang.Object id,
WriteConcern writeConcern) |
WriteResult |
DBCollection.save(DBObject document)
Update an existing document or insert a document depending on the parameter.
|
WriteResult |
DBCollection.save(DBObject document,
WriteConcern writeConcern)
Update an existing document or insert a document depending on the parameter.
|
void |
MapReduceCommand.setSort(DBObject sort)
Sets the (optional) sort specification object
|
DBCursor |
DBCursor.sort(DBObject orderBy)
Sorts this cursor's elements.
|
void |
BulkWriteRequestBuilder.update(DBObject update)
Adds a request to update all documents in the collection that match the query with which this builder was created.
|
void |
BulkUpdateRequestBuilder.update(DBObject update)
Adds a request to update all documents in the collection that match the query with which this builder was created.
|
WriteResult |
DBCollection.update(DBObject query,
DBObject update)
Modify an existing document.
|
WriteResult |
DBCollection.update(DBObject query,
DBObject update,
boolean upsert,
boolean multi)
Modify an existing document or documents in collection.
|
WriteResult |
DBCollection.update(DBObject query,
DBObject update,
boolean upsert,
boolean multi,
WriteConcern aWriteConcern)
Modify an existing document or documents in collection.
|
WriteResult |
DBCollection.update(DBObject query,
DBObject update,
boolean upsert,
boolean multi,
WriteConcern concern,
java.lang.Boolean bypassDocumentValidation,
DBEncoder encoder)
Modify an existing document or documents in collection.
|
WriteResult |
DBCollection.update(DBObject query,
DBObject update,
boolean upsert,
boolean multi,
WriteConcern concern,
DBEncoder encoder)
Modify an existing document or documents in collection.
|
WriteResult |
DBCollection.update(DBObject query,
DBObject update,
DBCollectionUpdateOptions options)
Modify an existing document or documents in collection.
|
WriteResult |
DBCollection.updateMulti(DBObject query,
DBObject update)
Modify documents in collection.
|
void |
BulkWriteRequestBuilder.updateOne(DBObject update)
Adds a request to update one document in the collection that matches the query with which this builder was created.
|
void |
BulkUpdateRequestBuilder.updateOne(DBObject update)
Adds a request to update one document in the collection that matches the query with which this builder was created.
|
private java.lang.Object |
DBObjectCodec.verifyForDBRef(DBObject document) |
private BsonDocument |
DB.wrap(DBObject document) |
(package private) BsonDocument |
DBCollection.wrap(DBObject document) |
private BsonDocument |
DB.wrap(DBObject document,
DBEncoder encoder) |
(package private) BsonDocument |
DBCollection.wrap(DBObject document,
DBEncoder encoder) |
(package private) BsonDocument |
DBCollection.wrap(DBObject document,
Encoder<DBObject> encoder) |
(package private) BsonDocument |
DBCollection.wrapAllowNull(DBObject document) |
Modifier and Type | Method and Description |
---|---|
AggregationOutput |
DBCollection.aggregate(java.util.List<? extends DBObject> pipeline)
Deprecated.
Use
DBCollection.aggregate(List, AggregationOptions) instead |
Cursor |
DBCollection.aggregate(java.util.List<? extends DBObject> pipeline,
AggregationOptions options)
Method implements aggregation framework.
|
Cursor |
DBCollection.aggregate(java.util.List<? extends DBObject> pipeline,
AggregationOptions options,
ReadPreference readPreference)
Method implements aggregation framework.
|
private Cursor |
DBCollection.aggregate(java.util.List<? extends DBObject> pipeline,
AggregationOptions options,
ReadPreference readPreference,
boolean returnCursorForOutCollection) |
AggregationOutput |
DBCollection.aggregate(java.util.List<? extends DBObject> pipeline,
ReadPreference readPreference)
Deprecated.
|
BulkUpdateRequestBuilder |
BulkWriteRequestBuilder.arrayFilters(java.util.List<? extends DBObject> arrayFilters)
Specifies that the request being built should use the given array filters for an update.
|
private MongoInternalException |
DBCollectionObjectFactory.createInternalException(java.lang.Class<? extends DBObject> aClass,
java.lang.Throwable e) |
DBCollection |
DB.createView(java.lang.String viewName,
java.lang.String viewOn,
java.util.List<? extends DBObject> pipeline)
Creates a view with the given name, backing collection/view name, and aggregation pipeline that defines the view.
|
DBCollection |
DB.createView(java.lang.String viewName,
java.lang.String viewOn,
java.util.List<? extends DBObject> pipeline,
DBCreateViewOptions options)
Creates a view with the given name, backing collection/view name, aggregation pipeline, and options that defines the view.
|
CommandResult |
DBCollection.explainAggregate(java.util.List<? extends DBObject> pipeline,
AggregationOptions options)
Return the explain plan for the aggregation pipeline.
|
private FindOperation<DBObject> |
DBCursor.getQueryOperation(Decoder<DBObject> decoder) |
private static java.lang.Object |
BulkWriteHelper.getUpsertedId(BulkWriteUpsert cur,
Decoder<DBObject> decoder) |
private void |
DBCursor.initializeCursor(FindOperation<DBObject> operation) |
WriteResult |
DBCollection.insert(java.util.List<? extends DBObject> documents)
Insert documents into a collection.
|
WriteResult |
DBCollection.insert(java.util.List<? extends DBObject> documents,
InsertOptions insertOptions)
Insert documents into a collection.
|
WriteResult |
DBCollection.insert(java.util.List<? extends DBObject> documents,
WriteConcern aWriteConcern)
Insert documents into a collection.
|
WriteResult |
DBCollection.insert(java.util.List<? extends DBObject> documents,
WriteConcern aWriteConcern,
DBEncoder dbEncoder)
Insert documents into a collection.
|
private boolean |
DBCollectionObjectFactory.isReflectionDBObject(java.lang.Class<? extends DBObject> aClass) |
private static DBObject |
DBCursor.lookupSuitableHints(DBObject query,
java.util.List<DBObject> hints) |
(package private) java.util.List<BsonDocument> |
DBCollection.preparePipeline(java.util.List<? extends DBObject> pipeline) |
void |
DBCollection.setHintFields(java.util.List<? extends DBObject> indexes)
Override MongoDB's default index selection and query optimization process.
|
void |
DBCollection.setInternalClass(java.lang.String path,
java.lang.Class<? extends DBObject> aClass)
Sets the internal class for the given path in the document hierarchy
|
void |
DBCollection.setObjectClass(java.lang.Class<? extends DBObject> aClass)
Sets a default class for objects in this collection; null resets the class to nothing.
|
private static BasicDBList |
DBCollection.toDBList(BatchCursor<DBObject> source) |
(package private) static BulkWriteException |
BulkWriteHelper.translateBulkWriteException(MongoBulkWriteException e,
Decoder<DBObject> decoder) |
(package private) static BulkWriteResult |
BulkWriteHelper.translateBulkWriteResult(BulkWriteResult bulkWriteResult,
Decoder<DBObject> decoder) |
(package private) static java.util.List<BulkWriteUpsert> |
BulkWriteHelper.translateBulkWriteUpserts(java.util.List<BulkWriteUpsert> upserts,
Decoder<DBObject> decoder) |
DBCollectionObjectFactory |
DBCollectionObjectFactory.update(java.lang.Class<? extends DBObject> aClass) |
DBCollectionObjectFactory |
DBCollectionObjectFactory.update(java.lang.Class<? extends DBObject> aClass,
java.util.List<java.lang.String> path) |
private java.util.Map<java.util.List<java.lang.String>,java.lang.Class<? extends DBObject>> |
DBCollectionObjectFactory.updatePathToClassMap(java.lang.Class<? extends DBObject> aClass,
java.util.List<java.lang.String> path) |
(package private) BsonDocument |
DBCollection.wrap(DBObject document,
Encoder<DBObject> encoder) |
(package private) java.util.List<BsonDocument> |
DBCollection.wrapAllowNull(java.util.List<? extends DBObject> documentList,
DBEncoder encoder) |
(package private) java.util.List<BsonDocument> |
DBCollection.wrapAllowNull(java.util.List<? extends DBObject> documentList,
Encoder<DBObject> encoder) |
(package private) java.util.List<BsonDocument> |
DBCollection.wrapAllowNull(java.util.List<? extends DBObject> documentList,
Encoder<DBObject> encoder) |
Constructor and Description |
---|
BulkUpdateRequestBuilder(BulkWriteOperation bulkWriteOperation,
DBObject query,
boolean upsert,
Encoder<DBObject> queryCodec,
Encoder<DBObject> replacementCodec,
Collation collation,
java.util.List<? extends DBObject> arrayFilters) |
BulkWriteError(int code,
java.lang.String message,
DBObject details,
int index)
Constructs a new instance.
|
BulkWriteRequestBuilder(BulkWriteOperation bulkWriteOperation,
DBObject query,
Encoder<DBObject> queryCodec,
Encoder<DBObject> replacementCodec) |
DBCursor(DBCollection collection,
DBObject filter,
DBCollectionFindOptions findOptions) |
DBCursor(DBCollection collection,
DBObject filter,
DBCollectionFindOptions findOptions,
OperationExecutor executor,
DBDecoderFactory decoderFactory,
Decoder<DBObject> decoder) |
DBCursor(DBCollection collection,
DBObject query,
DBObject fields,
ReadPreference readPreference)
Initializes a new database cursor.
|
GroupCommand(DBCollection collection,
DBObject keys,
DBObject condition,
DBObject initial,
java.lang.String reduce,
java.lang.String finalize)
Creates a new group command.
|
GroupCommand(DBCollection collection,
DBObject keys,
DBObject condition,
DBObject initial,
java.lang.String reduce,
java.lang.String finalize,
Collation collation)
Creates a new group command.
|
GroupCommand(DBCollection collection,
java.lang.String keyf,
DBObject condition,
DBObject initial,
java.lang.String reduce,
java.lang.String finalize)
Creates a new group command.
|
GroupCommand(DBCollection collection,
java.lang.String keyf,
DBObject condition,
DBObject initial,
java.lang.String reduce,
java.lang.String finalize,
Collation collation)
Creates a new group command.
|
InsertRequest(DBObject document,
Encoder<DBObject> codec) |
MapReduceCommand(DBCollection inputCollection,
java.lang.String map,
java.lang.String reduce,
java.lang.String outputCollection,
MapReduceCommand.OutputType type,
DBObject query)
Represents the command for a map reduce operation Runs the command in REPLACE output type to a named collection
|
MapReduceOutput(DBObject command,
DBCursor resultsFromCollection,
MapReduceStatistics mapReduceStatistics,
DBCollection outputCollection)
Constructor for use when the map reduce output was put into a collection
|
MapReduceOutput(DBObject command,
MapReduceBatchCursor<DBObject> results)
Constructor for use with inline map reduce.
|
RemoveRequest(DBObject query,
boolean multi,
Encoder<DBObject> codec,
Collation collation) |
ReplaceRequest(DBObject query,
DBObject document,
boolean upsert,
Encoder<DBObject> codec,
Encoder<DBObject> replacementCodec,
Collation collation) |
UpdateRequest(DBObject query,
DBObject update,
boolean multi,
boolean upsert,
Encoder<DBObject> codec,
Collation collation,
java.util.List<? extends DBObject> arrayFilters) |
WriteConcernError(int code,
java.lang.String message,
DBObject details)
Constructs a new instance.
|
Constructor and Description |
---|
AggregationOutput(java.util.List<DBObject> results)
Deprecated.
|
BulkUpdateRequestBuilder(BulkWriteOperation bulkWriteOperation,
DBObject query,
boolean upsert,
Encoder<DBObject> queryCodec,
Encoder<DBObject> replacementCodec,
Collation collation,
java.util.List<? extends DBObject> arrayFilters) |
BulkUpdateRequestBuilder(BulkWriteOperation bulkWriteOperation,
DBObject query,
boolean upsert,
Encoder<DBObject> queryCodec,
Encoder<DBObject> replacementCodec,
Collation collation,
java.util.List<? extends DBObject> arrayFilters) |
BulkUpdateRequestBuilder(BulkWriteOperation bulkWriteOperation,
DBObject query,
boolean upsert,
Encoder<DBObject> queryCodec,
Encoder<DBObject> replacementCodec,
Collation collation,
java.util.List<? extends DBObject> arrayFilters) |
BulkWriteRequestBuilder(BulkWriteOperation bulkWriteOperation,
DBObject query,
Encoder<DBObject> queryCodec,
Encoder<DBObject> replacementCodec) |
BulkWriteRequestBuilder(BulkWriteOperation bulkWriteOperation,
DBObject query,
Encoder<DBObject> queryCodec,
Encoder<DBObject> replacementCodec) |
CompoundDBObjectCodec(Codec<DBObject> codec) |
CompoundDBObjectCodec(Encoder<DBObject> encoder,
Decoder<DBObject> decoder) |
CompoundDBObjectCodec(Encoder<DBObject> encoder,
Decoder<DBObject> decoder) |
DBCollectionObjectFactory(java.util.Map<java.util.List<java.lang.String>,java.lang.Class<? extends DBObject>> pathToClassMap,
ReflectionDBObject.JavaWrapper wrapper) |
DBCursor(DBCollection collection,
DBObject filter,
DBCollectionFindOptions findOptions,
OperationExecutor executor,
DBDecoderFactory decoderFactory,
Decoder<DBObject> decoder) |
FieldInfo(java.lang.String name,
java.lang.Class<? extends DBObject> clazz) |
InsertRequest(DBObject document,
Encoder<DBObject> codec) |
MapReduceOutput(DBObject command,
MapReduceBatchCursor<DBObject> results)
Constructor for use with inline map reduce.
|
MongoCursorAdapter(MongoCursor<DBObject> cursor) |
RemoveRequest(DBObject query,
boolean multi,
Encoder<DBObject> codec,
Collation collation) |
ReplaceRequest(DBObject query,
DBObject document,
boolean upsert,
Encoder<DBObject> codec,
Encoder<DBObject> replacementCodec,
Collation collation) |
ReplaceRequest(DBObject query,
DBObject document,
boolean upsert,
Encoder<DBObject> codec,
Encoder<DBObject> replacementCodec,
Collation collation) |
UpdateRequest(DBObject query,
DBObject update,
boolean multi,
boolean upsert,
Encoder<DBObject> codec,
Collation collation,
java.util.List<? extends DBObject> arrayFilters) |
UpdateRequest(DBObject query,
DBObject update,
boolean multi,
boolean upsert,
Encoder<DBObject> codec,
Collation collation,
java.util.List<? extends DBObject> arrayFilters) |
Modifier and Type | Field and Description |
---|---|
private DBObject |
DBCollectionDistinctOptions.filter |
private DBObject |
DBCollectionCountOptions.hint |
private DBObject |
DBCollectionFindOptions.modifiers |
private DBObject |
DBCollectionFindAndModifyOptions.projection |
private DBObject |
DBCollectionFindOptions.projection |
private DBObject |
DBCollectionFindAndModifyOptions.sort |
private DBObject |
DBCollectionFindOptions.sort |
private DBObject |
DBCollectionFindAndModifyOptions.update |
Modifier and Type | Field and Description |
---|---|
private java.util.List<? extends DBObject> |
DBCollectionFindAndModifyOptions.arrayFilters |
private java.util.List<? extends DBObject> |
DBCollectionUpdateOptions.arrayFilters |
Modifier and Type | Method and Description |
---|---|
DBObject |
DBCollectionDistinctOptions.getFilter()
Gets the selection query to determine the subset of documents from which to retrieve the distinct values
|
DBObject |
DBCollectionCountOptions.getHint()
Gets the hint to apply.
|
DBObject |
DBCollectionFindOptions.getModifiers()
Gets the query modifiers to apply to this operation.
|
DBObject |
DBCollectionFindAndModifyOptions.getProjection()
Returns the projection
|
DBObject |
DBCollectionFindOptions.getProjection()
Gets a document describing the fields to return for all matching documents.
|
DBObject |
DBCollectionFindAndModifyOptions.getSort()
Returns the sort
|
DBObject |
DBCollectionFindOptions.getSort()
Gets the sort criteria to apply to the query.
|
DBObject |
DBCollectionFindAndModifyOptions.getUpdate()
Returns the update
|
Modifier and Type | Method and Description |
---|---|
java.util.List<? extends DBObject> |
DBCollectionFindAndModifyOptions.getArrayFilters()
Returns the array filters option
|
java.util.List<? extends DBObject> |
DBCollectionUpdateOptions.getArrayFilters()
Returns the array filters option
|
Modifier and Type | Method and Description |
---|---|
DBCollectionDistinctOptions |
DBCollectionDistinctOptions.filter(DBObject filter)
Sets the selection query to determine the subset of documents from which to retrieve the distinct values.
|
DBCollectionCountOptions |
DBCollectionCountOptions.hint(DBObject hint)
Sets the hint to apply.
|
DBCollectionFindOptions |
DBCollectionFindOptions.modifiers(DBObject modifiers)
Sets the query modifiers to apply to this operation.
|
DBCollectionFindAndModifyOptions |
DBCollectionFindAndModifyOptions.projection(DBObject projection)
Sets the projection
|
DBCollectionFindOptions |
DBCollectionFindOptions.projection(DBObject projection)
Sets a document describing the fields to return for all matching documents.
|
DBCollectionFindAndModifyOptions |
DBCollectionFindAndModifyOptions.sort(DBObject sort)
Sets the sort
|
DBCollectionFindOptions |
DBCollectionFindOptions.sort(DBObject sort)
Sets the sort criteria to apply to the query.
|
DBCollectionFindAndModifyOptions |
DBCollectionFindAndModifyOptions.update(DBObject update)
Sets the update
|
Modifier and Type | Method and Description |
---|---|
DBCollectionFindAndModifyOptions |
DBCollectionFindAndModifyOptions.arrayFilters(java.util.List<? extends DBObject> arrayFilters)
Sets the array filters option
|
DBCollectionUpdateOptions |
DBCollectionUpdateOptions.arrayFilters(java.util.List<? extends DBObject> arrayFilters)
Sets the array filters option
|
Modifier and Type | Class and Description |
---|---|
class |
GridFSDBFile
This class enables retrieving a GridFS file metadata and content.
|
class |
GridFSFile
The abstract class representing a GridFS file.
|
class |
GridFSInputFile
This class represents a GridFS file to be written to the database.
|
Modifier and Type | Field and Description |
---|---|
(package private) DBObject |
GridFSFile.extra |
Modifier and Type | Method and Description |
---|---|
protected DBObject |
GridFSInputFile.createChunk(java.lang.Object id,
int currentChunkNumber,
byte[] writeBuffer)
Creates a new chunk of this file.
|
DBObject |
GridFSFile.getMetaData()
Gets the file metadata.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<GridFSDBFile> |
GridFS.find(DBObject query)
Finds a list of files matching the given query.
|
java.util.List<GridFSDBFile> |
GridFS.find(DBObject query,
DBObject sort)
Finds a list of files matching the given query.
|
java.util.List<GridFSDBFile> |
GridFS.find(java.lang.String filename,
DBObject sort)
Finds a list of files matching the given filename.
|
GridFSDBFile |
GridFS.findOne(DBObject query)
Finds one file matching the given query.
|
DBCursor |
GridFS.getFileList(DBObject query)
Gets a filtered list of files stored in this gridfs, sorted by filename.
|
DBCursor |
GridFS.getFileList(DBObject query,
DBObject sort)
Gets a sorted, filtered list of files stored in this gridfs.
|
void |
GridFS.remove(DBObject query)
Removes all files matching the given query.
|
void |
GridFSFile.setMetaData(DBObject metadata)
Gets the file metadata.
|