Uses of Interface
com.mongodb.DBObject

Packages that use DBObject
com.mongodb Main package with core files. 
com.mongodb.gridfs GridFS tools. 
 

Uses of DBObject in com.mongodb
 

Classes in com.mongodb that implement DBObject
 class BasicDBList
          a basic implementation of bson list that is mongo specific
 class BasicDBObject
          a basic implementation of bson object that is mongo specific.
 class CommandResult
          A simple wrapper for the result of getLastError() calls and other commands
 class LazyDBObject
           
 class RawDBObject
          This object wraps the binary object format ("BSON") used for the transport of serialized objects to / from the Mongo database.
 class ReflectionDBObject
          This class enables to map simple Class fields to a BSON object fields
 

Fields in com.mongodb with type parameters of type DBObject
protected  List<DBObject> DBCollection._hintFields
           
 

Methods in com.mongodb that return DBObject
protected  DBObject DBCollection._checkObject(DBObject o, boolean canBeNull, boolean query)
           
 DBObject DBCursor.curr()
          Returns the element the cursor is at.
 DBObject DBDecoder.decode(byte[] b, DBCollection collection)
           
 DBObject LazyDBDecoder.decode(byte[] b, DBCollection collection)
           
 DBObject DefaultDBDecoder.decode(byte[] b, DBCollection collection)
           
 DBObject DBDecoder.decode(InputStream in, DBCollection collection)
           
 DBObject LazyDBDecoder.decode(InputStream in, DBCollection collection)
           
 DBObject DefaultDBDecoder.decode(InputStream in, DBCollection collection)
           
 DBObject DBCursor.explain()
          Returns an object containing basic information about the execution of the query that created this cursor This creates a DBObject with the key/value pairs: "cursor" : cursor type "nScanned" : number of records examined by the database for this query "n" : the number of records that the database returned "millis" : how long it took the database to execute the query
 DBObject DBRefBase.fetch()
          fetches the object referenced from the database
static DBObject DBRef.fetch(DB db, DBObject ref)
          fetches a referenced object from the database
 DBObject DBCollection.findAndModify(DBObject query, DBObject update)
          calls DBCollection.findAndModify(com.mongodb.DBObject, com.mongodb.DBObject, com.mongodb.DBObject, boolean, com.mongodb.DBObject, boolean, boolean) with fields=null, sort=null, remove=false, returnNew=false, upsert=false
 DBObject DBCollection.findAndModify(DBObject query, DBObject sort, DBObject update)
          calls DBCollection.findAndModify(com.mongodb.DBObject, com.mongodb.DBObject, com.mongodb.DBObject, boolean, com.mongodb.DBObject, boolean, boolean) with fields=null, remove=false, returnNew=false, upsert=false
 DBObject DBCollection.findAndModify(DBObject query, DBObject fields, DBObject sort, boolean remove, DBObject update, boolean returnNew, boolean upsert)
          Finds the first document in the query and updates it.
 DBObject DBCollection.findAndRemove(DBObject query)
          calls DBCollection.findAndModify(com.mongodb.DBObject, com.mongodb.DBObject, com.mongodb.DBObject, boolean, com.mongodb.DBObject, boolean, boolean) with fields=null, sort=null, remove=true, returnNew=false, upsert=false
 DBObject DBCollection.findOne()
          Returns a single object from this collection.
 DBObject DBCollection.findOne(DBObject o)
          Returns a single object from this collection matching the query.
 DBObject DBCollection.findOne(DBObject o, DBObject fields)
          Returns a single object from this collection matching the query.
 DBObject DBCollection.findOne(Object obj)
          Finds an object by its id.
 DBObject DBCollection.findOne(Object obj, DBObject fields)
          Finds an object by its id.
 DBObject BasicDBObjectBuilder.get()
          gets the base object
 DBObject QueryBuilder.get()
          Creates a DBObject query to be used for the driver's find operations
 DBObject MapReduceOutput.getCommand()
           
 DBObject MapReduceCommand.getExtraOptions()
           
 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 MapReduceCommand.getSort()
          Gets the (optional) sort specification object
 DBObject DBCollection.group(DBObject args)
          Deprecated. prefer the DBCollection.group(com.mongodb.GroupCommand) which is more standard Applies a group operation
 DBObject DBCollection.group(DBObject key, DBObject cond, DBObject initial, String reduce)
          calls DBCollection.group(com.mongodb.DBObject, com.mongodb.DBObject, com.mongodb.DBObject, java.lang.String, java.lang.String) with finalize=null
 DBObject DBCollection.group(DBObject key, DBObject cond, DBObject initial, String reduce, String finalize)
          Applies a group operation
 DBObject DBCollection.group(GroupCommand cmd)
          Applies a group operation
 DBObject DBCursor.next()
          Returns the object the cursor is at and moves the cursor ahead by one.
 DBObject GroupCommand.toDBObject()
           
 DBObject MapReduceCommand.toDBObject()
           
 DBObject Mongo.unlock()
          Unlocks the database, allowing the write operations to go through.
 

Methods in com.mongodb that return types with arguments of type DBObject
 List<DBObject> DBCollection.getIndexInfo()
          Return a list of the indexes for this collection.
 Iterator<DBObject> DBCursor.iterator()
          creates a copy of this cursor object that can be iterated.
 Iterable<DBObject> MapReduceOutput.results()
          returns a cursor to the results of the operation
 List<DBObject> DBCursor.toArray()
          Converts this cursor to an array.
 List<DBObject> DBCursor.toArray(int max)
          Converts this cursor to an array.
 

Methods in com.mongodb with parameters of type DBObject
protected  DBObject DBCollection._checkObject(DBObject o, boolean canBeNull, boolean query)
           
 Object DBCollection.apply(DBObject o)
          calls DBCollection.apply(com.mongodb.DBObject, boolean) with ensureID=true
 Object DBCollection.apply(DBObject jo, boolean ensureID)
          calls DBCollection.doapply(com.mongodb.DBObject), optionally adding an automatic _id field
 CommandResult DB.command(DBObject cmd)
          Executes a database command.
 CommandResult DB.command(DBObject cmd, int options)
          Executes a database command.
 long DBCollection.count(DBObject query)
          returns the number of documents that match a query.
 DBCollection DB.createCollection(String name, DBObject options)
          Creates a collection with a given name and options.
 void DBCollection.createIndex(DBObject keys)
          calls DBCollection.createIndex(com.mongodb.DBObject, com.mongodb.DBObject) with default index options
abstract  void DBCollection.createIndex(DBObject keys, DBObject options)
          Forces creation of an index on a set of fields, if one does not already exist.
 List DBCollection.distinct(String key, DBObject query)
          find distinct values for a key
protected abstract  void DBCollection.doapply(DBObject o)
          Adds any necessary fields to a given object before saving it to the collection.
 void DBCollection.dropIndex(DBObject keys)
          Drops an index from this collection
 void DBCollection.ensureIndex(DBObject keys)
          calls DBCollection.ensureIndex(com.mongodb.DBObject, com.mongodb.DBObject) with default options
 void DBCollection.ensureIndex(DBObject keys, DBObject optionsIN)
          Creates an index on a set of fields, if one does not already exist.
 void DBCollection.ensureIndex(DBObject keys, String name)
          calls DBCollection.ensureIndex(com.mongodb.DBObject, java.lang.String, boolean) with unique=false
 void DBCollection.ensureIndex(DBObject keys, String name, boolean unique)
          Ensures an index on this collection (that is, the index will be created if it does not exist).
static DBObject DBRef.fetch(DB db, DBObject ref)
          fetches a referenced object from the database
 DBCursor DBCollection.find(DBObject ref)
          Queries for an object in this collection.
 DBCursor DBCollection.find(DBObject ref, DBObject keys)
          Queries for an object in this collection.
 DBCursor DBCollection.find(DBObject query, DBObject fields, int numToSkip, int batchSize)
          Deprecated. 
 DBCursor DBCollection.find(DBObject query, DBObject fields, int numToSkip, int batchSize, int options)
          Deprecated. 
 DBObject DBCollection.findAndModify(DBObject query, DBObject update)
          calls DBCollection.findAndModify(com.mongodb.DBObject, com.mongodb.DBObject, com.mongodb.DBObject, boolean, com.mongodb.DBObject, boolean, boolean) with fields=null, sort=null, remove=false, returnNew=false, upsert=false
 DBObject DBCollection.findAndModify(DBObject query, DBObject sort, DBObject update)
          calls DBCollection.findAndModify(com.mongodb.DBObject, com.mongodb.DBObject, com.mongodb.DBObject, boolean, com.mongodb.DBObject, boolean, boolean) with fields=null, remove=false, returnNew=false, upsert=false
 DBObject DBCollection.findAndModify(DBObject query, DBObject fields, DBObject sort, boolean remove, DBObject update, boolean returnNew, boolean upsert)
          Finds the first document in the query and updates it.
 DBObject DBCollection.findAndRemove(DBObject query)
          calls DBCollection.findAndModify(com.mongodb.DBObject, com.mongodb.DBObject, com.mongodb.DBObject, boolean, com.mongodb.DBObject, boolean, boolean) with fields=null, sort=null, remove=true, returnNew=false, upsert=false
 DBObject DBCollection.findOne(DBObject o)
          Returns a single object from this collection matching the query.
 DBObject DBCollection.findOne(DBObject o, DBObject fields)
          Returns a single object from this collection matching the query.
 DBObject DBCollection.findOne(Object obj, DBObject fields)
          Finds an object by its id.
static String DBCollection.genIndexName(DBObject keys)
          Convenience method to generate an index name from the set of fields it is over.
 long DBCollection.getCount(DBObject query)
          calls DBCollection.getCount(com.mongodb.DBObject, com.mongodb.DBObject) with null fields.
 long DBCollection.getCount(DBObject query, DBObject fields)
          calls DBCollection.getCount(com.mongodb.DBObject, com.mongodb.DBObject, long, long) with limit=0 and skip=0
 long DBCollection.getCount(DBObject query, DBObject fields, long limit, long skip)
          Returns the number of documents in the collection that match the specified query
 DBObject DBCollection.group(DBObject args)
          Deprecated. prefer the DBCollection.group(com.mongodb.GroupCommand) which is more standard Applies a group operation
 DBObject DBCollection.group(DBObject key, DBObject cond, DBObject initial, String reduce)
          calls DBCollection.group(com.mongodb.DBObject, com.mongodb.DBObject, com.mongodb.DBObject, java.lang.String, java.lang.String) with finalize=null
 DBObject DBCollection.group(DBObject key, DBObject cond, DBObject initial, String reduce, String finalize)
          Applies a group operation
 DBCursor DBCursor.hint(DBObject indexKeys)
          Informs the database of indexed fields of the collection in order to improve performance.
 WriteResult DBCollection.insert(DBObject... arr)
          Saves document(s) to the database.
abstract  WriteResult DBCollection.insert(DBObject[] arr, WriteConcern concern)
          Saves document(s) to the database.
 WriteResult DBCollection.insert(DBObject o, WriteConcern concern)
          Inserts a document into the database.
 MapReduceOutput DBCollection.mapReduce(DBObject command)
          performs a map reduce operation
 MapReduceOutput DBCollection.mapReduce(String map, String reduce, String outputTarget, DBObject query)
          performs a map reduce operation Runs the command in REPLACE output mode (saves to named collection)
 MapReduceOutput DBCollection.mapReduce(String map, String reduce, String outputTarget, MapReduceCommand.OutputType outputType, DBObject query)
          performs a map reduce operation Specify an outputType to control job execution * INLINE - Return results inline * REPLACE - Replace the output collection with the job output * MERGE - Merge the job output with the existing contents of outputTarget * REDUCE - Reduce the job output with the existing contents of outputTarget
 QueryBuilder QueryBuilder.or(DBObject... ors)
          Equivalent to a $or operand
 WriteResult DBCollection.remove(DBObject o)
          calls DBCollection.remove(com.mongodb.DBObject, com.mongodb.WriteConcern) with the default WriteConcern
abstract  WriteResult DBCollection.remove(DBObject o, WriteConcern concern)
          Removes objects from the database collection.
 WriteResult DBCollection.save(DBObject jo)
          calls DBCollection.save(com.mongodb.DBObject, com.mongodb.WriteConcern) with default WriteConcern
 WriteResult DBCollection.save(DBObject jo, WriteConcern concern)
          Saves an object to this collection (does insert or update based on the object _id).
 void MapReduceCommand.setSort(DBObject sort)
          Sets the (optional) sort specification object
 DBCursor DBCursor.sort(DBObject orderBy)
          Sorts this cursor's elements.
 WriteResult DBCollection.update(DBObject q, DBObject o)
          calls DBCollection.update(com.mongodb.DBObject, com.mongodb.DBObject, boolean, boolean) with upsert=false and multi=false
 WriteResult DBCollection.update(DBObject q, DBObject o, boolean upsert, boolean multi)
          calls DBCollection.update(com.mongodb.DBObject, com.mongodb.DBObject, boolean, boolean, com.mongodb.WriteConcern) with default WriteConcern.
abstract  WriteResult DBCollection.update(DBObject q, DBObject o, boolean upsert, boolean multi, WriteConcern concern)
          Performs an update operation.
 WriteResult DBCollection.updateMulti(DBObject q, DBObject o)
          calls DBCollection.update(com.mongodb.DBObject, com.mongodb.DBObject, boolean, boolean) with upsert=false and multi=true
 

Method parameters in com.mongodb with type arguments of type DBObject
 WriteResult DBCollection.insert(List<DBObject> list)
          Saves document(s) to the database.
 WriteResult DBCollection.insert(List<DBObject> list, WriteConcern concern)
          Saves document(s) to the database.
 void DBCollection.setHintFields(List<DBObject> lst)
          Set hint fields for this collection (to optimize queries).
 

Constructors in com.mongodb with parameters of type DBObject
DBCursor(DBCollection collection, DBObject q, DBObject k)
          Initializes a new database cursor
GroupCommand(DBCollection inputCollection, DBObject keys, DBObject condition, DBObject initial, String reduce, String finalize)
           
MapReduceCommand(DBCollection inputCollection, String map, String reduce, 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(DBCollection from, DBObject cmd, BasicDBObject raw)
           
 

Uses of DBObject in com.mongodb.gridfs
 

Classes in com.mongodb.gridfs that implement DBObject
 class GridFSDBFile
          This class enables to retrieve 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 Operations include: - writing data obtained from an InputStream - getting an OutputStream to stream the data out
 

Methods in com.mongodb.gridfs that return DBObject
 DBObject GridFSFile.getMetaData()
          Gets the file metadata
 

Methods in com.mongodb.gridfs with parameters of type DBObject
 List<GridFSDBFile> GridFS.find(DBObject query)
          finds a list of files matching the given query
 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
 void GridFS.remove(DBObject query)
          removes all files matching the given query
 void GridFSFile.setMetaData(DBObject metadata)
          Gets the file metadata