Package | Description |
---|---|
com.mongodb |
Main package with core files.
|
com.mongodb.gridfs |
GridFS tools.
|
org.bson |
Contains the base BSON classes and Encoder/Decoder.
|
Modifier and Type | Class and Description |
---|---|
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 |
LazyWriteableDBObject |
class |
RawDBObject
Deprecated.
This class is NOT a part of public API and will be dropped in 3.x versions.
|
class |
ReflectionDBObject
This class enables to map simple Class fields to a BSON object fields
|
Modifier and Type | Field and Description |
---|---|
protected DBObject |
AggregationOutput._cmd
Deprecated.
Please use
AggregationOutput.getCommand() instead. |
Modifier and Type | Field and Description |
---|---|
protected List<DBObject> |
DBCollection._hintFields
Deprecated.
Please use
DBCollection.setHintFields(java.util.List) and DBCollection.getHintFields() instead. |
protected Iterable<DBObject> |
AggregationOutput._resultSet
Deprecated.
Please use
AggregationOutput.results() instead. |
Modifier and Type | Method and Description |
---|---|
protected DBObject |
DBCollection._checkObject(DBObject o,
boolean canBeNull,
boolean query)
Deprecated.
This method should not be a part of API.
If you override one of the
DBCollection methods please rely on superclass
implementation in checking argument correctness and validity. |
DBObject |
DBCursor.curr()
Returns the element the cursor is at.
|
DBObject |
LazyDBDecoder.decode(byte[] b,
DBCollection collection) |
DBObject |
DefaultDBDecoder.decode(byte[] b,
DBCollection collection) |
DBObject |
DBDecoder.decode(byte[] b,
DBCollection collection) |
DBObject |
LazyDBDecoder.decode(InputStream in,
DBCollection collection) |
DBObject |
DefaultDBDecoder.decode(InputStream in,
DBCollection collection) |
DBObject |
DBDecoder.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)
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,
long maxTime,
TimeUnit maxTimeUnit)
Atomically modify and return a single document.
|
DBObject |
DBCollection.findAndRemove(DBObject query)
Atomically modify and return a single document.
|
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(DBObject o,
DBObject fields,
DBObject orderBy)
Returns a single object from this collection matching the query.
|
DBObject |
DBCollection.findOne(DBObject o,
DBObject fields,
DBObject orderBy,
ReadPreference readPref)
Get a single document from collection.
|
DBObject |
DBCollection.findOne(DBObject o,
DBObject fields,
ReadPreference readPref)
Get a single document from collection.
|
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 |
QueryBuilder.get()
Creates a
DBObject query to be used for the driver's find operations |
DBObject |
BasicDBObjectBuilder.get()
gets the base object
|
DBObject |
MapReduceOutput.getCommand()
Get the original command that was sent to the database.
|
DBObject |
AggregationOutput.getCommand()
Deprecated.
there is no replacement for this method
|
DBObject |
WriteConcernError.getDetails()
Gets the details associated with this error.
|
DBObject |
BulkWriteError.getDetails()
Gets the details associated with this error.
|
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 |
ReadPreference.TaggedReadPreference.getTags()
Deprecated.
|
DBObject |
DBCollection.group(DBObject args)
Deprecated.
use
DBCollection.group(com.mongodb.GroupCommand) instead. This method will be removed in 3.0 |
DBObject |
DBCollection.group(DBObject key,
DBObject cond,
DBObject initial,
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,
String reduce,
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,
String reduce,
String finalize,
ReadPreference readPrefs)
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 readPrefs)
Group documents in a collection by the specified key and performs simple aggregation functions such as computing counts and sums.
|
DBObject |
DBCursor.next()
Returns the object the cursor is at and moves the cursor ahead by one.
|
DBObject |
DBCursor.one() |
DBObject |
TaggableReadPreference.toDBObject() |
abstract DBObject |
ReadPreference.toDBObject() |
DBObject |
ReadPreference.TaggedReadPreference.toDBObject()
Deprecated.
|
DBObject |
MapReduceCommand.toDBObject() |
DBObject |
GroupCommand.toDBObject() |
DBObject |
Mongo.unlock()
Unlocks the database, allowing the write operations to go through.
|
Modifier and Type | Method and Description |
---|---|
protected List<DBObject> |
DBCollection.getHintFields()
Get hint fields for this collection (used to optimize queries).
|
List<DBObject> |
DBCollection.getIndexInfo()
Return a list of the indexes for this collection.
|
List<DBObject> |
TaggableReadPreference.getTagSets() |
Iterator<DBObject> |
DBCursor.iterator()
creates a copy of this cursor object that can be iterated.
|
Iterable<DBObject> |
MapReduceOutput.results()
Returns an iterable containing the results of the operation.
|
Iterable<DBObject> |
AggregationOutput.results()
returns an iterator to the results of the aggregation
|
List<DBObject> |
DBCursor.toArray()
Converts this cursor to an array.
|
List<DBObject> |
DBCursor.toArray(int max)
Converts this cursor to an array.
|
Modifier and Type | Method and Description |
---|---|
protected DBObject |
DBCollection._checkObject(DBObject o,
boolean canBeNull,
boolean query)
Deprecated.
This method should not be a part of API.
If you override one of the
DBCollection methods please rely on superclass
implementation in checking argument correctness and validity. |
AggregationOutput |
DBCollection.aggregate(DBObject firstOp,
DBObject... additionalOps)
Deprecated.
Use
DBCollection.aggregate(java.util.List) instead |
AggregationOutput |
DBCollection.aggregate(DBObject firstOp,
DBObject... additionalOps)
Deprecated.
Use
DBCollection.aggregate(java.util.List) instead |
QueryBuilder |
QueryBuilder.and(DBObject... ands)
Equivalent to an $and operand
|
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,
DBEncoder encoder)
Executes a database command.
|
CommandResult |
DB.command(DBObject cmd,
int options)
Deprecated.
Use
DB.command(DBObject, ReadPreference) instead. This method will be removed in 3.0. |
CommandResult |
DB.command(DBObject cmd,
int options,
DBEncoder encoder)
Deprecated.
Use
DB.command(DBObject, ReadPreference, DBEncoder) instead. This method will be removed in 3.0. |
CommandResult |
DB.command(DBObject cmd,
int options,
ReadPreference readPreference)
Deprecated.
Use
DB.command(DBObject, ReadPreference) instead. This method will be removed in 3.0. |
CommandResult |
DB.command(DBObject cmd,
int options,
ReadPreference readPreference,
DBEncoder encoder)
Deprecated.
Use
DB.command(DBObject, ReadPreference, DBEncoder) instead. This method will be removed in 3.0. |
CommandResult |
DB.command(DBObject cmd,
ReadPreference readPreference)
Executes the command against the database with the given read preference.
|
CommandResult |
DB.command(DBObject cmd,
ReadPreference readPreference,
DBEncoder encoder)
Executes a database command with the selected readPreference, and encodes the command using the given encoder.
|
long |
DBCollection.count(DBObject query)
Get the count of documents in collection that would match a criteria.
|
long |
DBCollection.count(DBObject query,
ReadPreference readPrefs)
Get the count of documents in collection that would match a criteria.
|
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 |
void |
DBCollection.createIndex(DBObject keys,
DBObject options)
Forces creation of an index on a set of fields, if one does not already exist.
|
abstract void |
DBCollection.createIndex(DBObject keys,
DBObject options,
DBEncoder encoder)
Deprecated.
use
DBCollection.createIndex(DBObject, com.mongodb.DBObject) the encoder is not used. |
List |
DBCollection.distinct(String key,
DBObject query)
Find the distinct values for a specified field across a collection and returns the results in an array.
|
List |
DBCollection.distinct(String key,
DBObject query,
ReadPreference readPrefs)
Find the distinct values for a specified field across a collection and returns the results in an array.
|
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
|
QueryBuilder |
QueryBuilder.elemMatch(DBObject match)
Equivalent to the $elemMatch operand
|
void |
DBCollection.ensureIndex(DBObject keys)
Deprecated.
use
DBCollection.createIndex(DBObject) instead |
void |
DBCollection.ensureIndex(DBObject keys,
DBObject optionsIN)
Deprecated.
use
DBCollection.createIndex(DBObject, DBObject) instead |
void |
DBCollection.ensureIndex(DBObject keys,
String name)
Deprecated.
use
DBCollection.createIndex(DBObject, DBObject) instead |
void |
DBCollection.ensureIndex(DBObject keys,
String name,
boolean unique)
Deprecated.
use
DBCollection.createIndex(DBObject, DBObject) instead |
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.
|
BulkWriteRequestBuilder |
BulkWriteOperation.find(DBObject query)
Start building a write request to add to the bulk write operation.
|
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.
use
DBCursor.skip(int) and DBCursor.batchSize(int) on the DBCursor
returned from DBCollection.find(DBObject, DBObject) |
DBCursor |
DBCollection.find(DBObject query,
DBObject fields,
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,
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,
long maxTime,
TimeUnit maxTimeUnit)
Atomically modify and return a single document.
|
DBObject |
DBCollection.findAndRemove(DBObject query)
Atomically modify and return a single document.
|
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(DBObject o,
DBObject fields,
DBObject orderBy)
Returns a single object from this collection matching the query.
|
DBObject |
DBCollection.findOne(DBObject o,
DBObject fields,
DBObject orderBy,
ReadPreference readPref)
Get a single document from collection.
|
DBObject |
DBCollection.findOne(DBObject o,
DBObject fields,
ReadPreference readPref)
Get a single document from collection.
|
DBObject |
DBCollection.findOne(Object obj,
DBObject fields)
Finds an object by its id.
|
static String |
DBCollection.genIndexName(DBObject keys)
Deprecated.
This method is NOT a part of public API and will be dropped in 3.x versions.
|
long |
DBCollection.getCount(DBObject query)
Get the count of documents in collection that would match a criteria.
|
long |
DBCollection.getCount(DBObject query,
DBObject fields)
Get the count of documents in collection that would match a criteria.
|
long |
DBCollection.getCount(DBObject query,
DBObject fields,
long limit,
long skip)
Get the count of documents in collection that would match a criteria.
|
long |
DBCollection.getCount(DBObject query,
DBObject fields,
long limit,
long skip,
ReadPreference readPrefs)
Get the count of documents in collection that would match a criteria.
|
long |
DBCollection.getCount(DBObject query,
DBObject fields,
ReadPreference readPrefs)
Get the count of documents in collection that would match a criteria.
|
DBObject |
DBCollection.group(DBObject args)
Deprecated.
use
DBCollection.group(com.mongodb.GroupCommand) instead. This method will be removed in 3.0 |
DBObject |
DBCollection.group(DBObject key,
DBObject cond,
DBObject initial,
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,
String reduce,
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,
String reduce,
String finalize,
ReadPreference readPrefs)
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... arr)
Insert documents into a collection.
|
void |
BulkWriteOperation.insert(DBObject document)
Add an insert request to the bulk operation
|
WriteResult |
DBCollection.insert(DBObject[] arr,
WriteConcern concern)
Insert documents into a collection.
|
WriteResult |
DBCollection.insert(DBObject[] arr,
WriteConcern concern,
DBEncoder encoder)
Insert documents into a collection.
|
WriteResult |
DBCollection.insert(DBObject o,
WriteConcern concern)
Insert a document into a collection.
|
WriteResult |
DBCollection.insert(WriteConcern concern,
DBObject... arr)
Insert documents into a collection.
|
MapReduceOutput |
DBCollection.mapReduce(DBObject command)
Deprecated.
Use
DBCollection.mapReduce(MapReduceCommand) instead |
MapReduceOutput |
DBCollection.mapReduce(String map,
String reduce,
String outputTarget,
DBObject query)
Allows you to run map-reduce aggregation operations over a collection.
|
MapReduceOutput |
DBCollection.mapReduce(String map,
String reduce,
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(String map,
String reduce,
String outputTarget,
MapReduceCommand.OutputType outputType,
DBObject query,
ReadPreference readPrefs)
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.
|
static TaggableReadPreference |
ReadPreference.nearest(DBObject firstTagSet,
DBObject... remainingTagSets) |
static TaggableReadPreference |
ReadPreference.nearest(DBObject firstTagSet,
DBObject... remainingTagSets) |
QueryBuilder |
QueryBuilder.or(DBObject... ors)
Equivalent to an $or operand
|
static TaggableReadPreference |
ReadPreference.primaryPreferred(DBObject firstTagSet,
DBObject... remainingTagSets) |
static TaggableReadPreference |
ReadPreference.primaryPreferred(DBObject firstTagSet,
DBObject... remainingTagSets) |
WriteResult |
DBCollection.remove(DBObject o)
Remove documents from a collection.
|
WriteResult |
DBCollection.remove(DBObject o,
WriteConcern concern)
Remove documents from a collection.
|
abstract WriteResult |
DBCollection.remove(DBObject o,
WriteConcern concern,
DBEncoder encoder)
Remove documents from a collection.
|
void |
BulkWriteRequestBuilder.replaceOne(DBObject document)
Adds a request to replace one matching documents to the bulk operation.
|
void |
BulkUpdateRequestBuilder.replaceOne(DBObject document)
Adds an update request to replace one matching document to the bulk operation.
|
WriteResult |
DBCollection.save(DBObject jo)
Update an existing document or insert a document depending on the parameter.
|
WriteResult |
DBCollection.save(DBObject jo,
WriteConcern concern)
Update an existing document or insert a document depending on the parameter.
|
static TaggableReadPreference |
ReadPreference.secondary(DBObject firstTagSet,
DBObject... remainingTagSets) |
static TaggableReadPreference |
ReadPreference.secondary(DBObject firstTagSet,
DBObject... remainingTagSets) |
static TaggableReadPreference |
ReadPreference.secondaryPreferred(DBObject firstTagSet,
DBObject... remainingTagSets) |
static TaggableReadPreference |
ReadPreference.secondaryPreferred(DBObject firstTagSet,
DBObject... remainingTagSets) |
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 replace one matching documents to the bulk operation.
|
void |
BulkUpdateRequestBuilder.update(DBObject update)
Adds an update request to update all matching documents to the bulk operation.
|
WriteResult |
DBCollection.update(DBObject q,
DBObject o)
Modify an existing document or documents in collection.
|
WriteResult |
DBCollection.update(DBObject q,
DBObject o,
boolean upsert,
boolean multi)
Modify an existing document or documents in collection.
|
WriteResult |
DBCollection.update(DBObject q,
DBObject o,
boolean upsert,
boolean multi,
WriteConcern concern)
Modify an existing document or documents in collection.
|
abstract WriteResult |
DBCollection.update(DBObject q,
DBObject o,
boolean upsert,
boolean multi,
WriteConcern concern,
DBEncoder encoder)
Modify an existing document or documents in collection.
|
WriteResult |
DBCollection.updateMulti(DBObject q,
DBObject o)
Modify an existing document or documents in collection.
|
void |
BulkWriteRequestBuilder.updateOne(DBObject update)
Adds a request to update one matching documents to the bulk operation.
|
void |
BulkUpdateRequestBuilder.updateOne(DBObject update)
Adds an update request to update one matching document to the bulk operation.
|
static TaggableReadPreference |
ReadPreference.valueOf(String name,
DBObject firstTagSet,
DBObject... remainingTagSets) |
static TaggableReadPreference |
ReadPreference.valueOf(String name,
DBObject firstTagSet,
DBObject... remainingTagSets) |
static ReadPreference |
ReadPreference.withTags(DBObject tags)
Deprecated.
As of release 2.9.0, replaced by
ReadPreference.secondaryPreferred(DBObject firstTagSet, DBObject... remainingTagSets) |
Modifier and Type | Method and Description |
---|---|
AggregationOutput |
DBCollection.aggregate(List<DBObject> pipeline)
Method implements aggregation framework.
|
Cursor |
DBCollection.aggregate(List<DBObject> pipeline,
AggregationOptions options)
Method implements aggregation framework.
|
abstract Cursor |
DBCollection.aggregate(List<DBObject> pipeline,
AggregationOptions options,
ReadPreference readPreference)
Method implements aggregation framework.
|
AggregationOutput |
DBCollection.aggregate(List<DBObject> pipeline,
ReadPreference readPreference)
Method implements aggregation framework.
|
CommandResult |
DBCollection.explainAggregate(List<DBObject> pipeline,
AggregationOptions options)
Return the explain plan for the aggregation pipeline.
|
WriteResult |
DBCollection.insert(List<DBObject> list)
Insert documents into a collection.
|
WriteResult |
DBCollection.insert(List<DBObject> list,
WriteConcern concern)
Insert documents into a collection.
|
abstract WriteResult |
DBCollection.insert(List<DBObject> list,
WriteConcern concern,
DBEncoder encoder)
Insert documents into a collection.
|
void |
DBCollection.setHintFields(List<DBObject> lst)
Set hint fields for this collection (to optimize queries).
|
Constructor and Description |
---|
AggregationOutput(DBObject command,
CommandResult commandResult)
Deprecated.
there is no replacement for this constructor
|
BulkWriteError(int code,
String message,
DBObject details,
int index)
Constructs a new instance.
|
DBCursor(DBCollection collection,
DBObject q,
DBObject k,
ReadPreference preference)
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,
CommandResult raw)
Deprecated.
In the 3.0 version of the driver, this will be constructed only by the driver, and will therefore not have a public
constructor.
|
ReadPreference.TaggedReadPreference(DBObject tags)
Deprecated.
|
WriteConcernError(int code,
String message,
DBObject details)
Constructs a new instance.
|
Modifier and Type | Class and Description |
---|---|
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
|
Modifier and Type | Method and Description |
---|---|
protected DBObject |
GridFSInputFile.createChunk(Object id,
int currentChunkNumber,
byte[] writeBuffer) |
DBObject |
GridFSFile.getMetaData()
Gets the file metadata
|
Modifier and Type | Method and Description |
---|---|
List<GridFSDBFile> |
GridFS.find(DBObject query)
finds a list of files matching the given query
|
List<GridFSDBFile> |
GridFS.find(DBObject query,
DBObject sort)
finds a list of files matching the given query
|
List<GridFSDBFile> |
GridFS.find(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 filtered list of files stored in this gridfs, sorted by param sort
|
void |
GridFS.remove(DBObject query)
removes all files matching the given query
|
void |
GridFSFile.setMetaData(DBObject metadata)
Gets the file metadata
|
Modifier and Type | Class and Description |
---|---|
class |
LazyDBList
Deprecated.
Please use
LazyDBList instead. |