Package | Description |
---|---|
com.mongodb |
This package is the main entry point to the MongoDB Java Driver, and it contains the classes for the existing API from 2.x versions.
|
com.mongodb.client.gridfs |
This package contains the new GridFS implementation
|
com.mongodb.client.gridfs.model |
This package contains models for use with GridFS
|
com.mongodb.connection |
Contains classes that manage connecting to MongoDB servers.
|
com.mongodb.gridfs |
Contains the classes for supporting MongoDB's specification for storing very large files, GridFS.
|
org.bson |
This package contains bson classes required for the driver
|
org.bson.codecs |
This package contains all the default BSON codecs.
|
org.bson.io |
This package contains I/O utilities
|
org.bson.json |
JSON serialization and deserialization.
|
org.bson.types |
This package contains driver specific type classes
|
Modifier and Type | Method and Description |
---|---|
Object |
LazyDBCallback.createDBRef(String ns,
ObjectId id) |
void |
DefaultDBCallback.gotDBRef(String name,
String namespace,
ObjectId id) |
Modifier and Type | Method and Description |
---|---|
abstract ObjectId |
GridFSUploadStream.getFileId()
Gets the
ObjectId for the file to be uploaded |
ObjectId |
GridFSBucket.uploadFromStream(String filename,
InputStream source)
Uploads a user file to a GridFS bucket.
|
ObjectId |
GridFSBucket.uploadFromStream(String filename,
InputStream source,
GridFSUploadOptions options)
Uploads a user file to a GridFS bucket.
|
Modifier and Type | Method and Description |
---|---|
void |
GridFSBucket.delete(ObjectId id)
Given a
id , delete this stored file's files collection document and associated chunks from a GridFS bucket. |
void |
GridFSBucket.downloadToStream(ObjectId id,
OutputStream destination)
Downloads the contents of the stored file specified by
id and writes the contents to the destination Stream. |
GridFSDownloadStream |
GridFSBucket.openDownloadStream(ObjectId id)
Opens a Stream from which the application can read the contents of the stored file specified by
id . |
void |
GridFSBucket.rename(ObjectId id,
String newFilename)
Renames the stored file with the specified
id . |
Modifier and Type | Method and Description |
---|---|
ObjectId |
GridFSFile.getObjectId()
The
ObjectId for this file. |
Modifier and Type | Method and Description |
---|---|
ObjectId |
ServerDescription.getElectionId()
The replica set electionid reported by this MongoDB server.
|
Modifier and Type | Method and Description |
---|---|
ServerDescription.Builder |
ServerDescription.Builder.electionId(ObjectId electionId)
Sets the electionId reported by this server.
|
Modifier and Type | Method and Description |
---|---|
GridFSDBFile |
GridFS.find(ObjectId objectId)
Finds one file matching the given objectId.
|
GridFSDBFile |
GridFS.findOne(ObjectId objectId)
Finds one file matching the given objectId.
|
void |
GridFS.remove(ObjectId id)
Removes the file matching the given id.
|
Modifier and Type | Method and Description |
---|---|
protected ObjectId |
BsonBinaryReader.doReadObjectId() |
protected abstract ObjectId |
AbstractBsonReader.doReadObjectId()
Handles the logic to read an ObjectId
|
protected ObjectId |
BsonDocumentReader.doReadObjectId() |
ObjectId |
BsonDbPointer.getId()
Gets the id.
|
ObjectId |
Document.getObjectId(Object key)
Gets the value of the given key as an ObjectId.
|
ObjectId |
BasicBSONObject.getObjectId(String field)
Returns the object id or null if not set.
|
ObjectId |
BasicBSONObject.getObjectId(String field,
ObjectId def)
Returns the object id or def if not set.
|
ObjectId |
BsonObjectId.getValue()
Get the
ObjectId value. |
ObjectId |
BsonReader.readObjectId()
Reads a BSON ObjectId from the reader.
|
ObjectId |
AbstractBsonReader.readObjectId() |
ObjectId |
BsonReader.readObjectId(String name)
Reads a BSON ObjectId element from the reader.
|
ObjectId |
AbstractBsonReader.readObjectId(String name) |
Modifier and Type | Method and Description |
---|---|
Object |
LazyBSONCallback.createDBRef(String ns,
ObjectId id)
This is a factory method pattern to create appropriate objects for BSON type DBPointer(0x0c).
|
void |
BsonDocumentWriter.doWriteObjectId(ObjectId value) |
protected abstract void |
AbstractBsonWriter.doWriteObjectId(ObjectId value)
Handles the logic of writing an ObjectId
|
void |
BsonBinaryWriter.doWriteObjectId(ObjectId value) |
ObjectId |
BasicBSONObject.getObjectId(String field,
ObjectId def)
Returns the object id or def if not set.
|
void |
BSONCallback.gotDBRef(String name,
String namespace,
ObjectId id)
Invoked when
BSONDecoder encountered a BsonType.DB_POINTER type field in a byte sequence. |
void |
BasicBSONCallback.gotDBRef(String name,
String namespace,
ObjectId id) |
void |
EmptyBSONCallback.gotDBRef(String name,
String namespace,
ObjectId id) |
void |
BSONCallback.gotObjectId(String name,
ObjectId id)
Called when reading a field with a
BsonType.OBJECT_ID value. |
void |
BasicBSONCallback.gotObjectId(String name,
ObjectId id) |
void |
EmptyBSONCallback.gotObjectId(String name,
ObjectId id) |
protected void |
BasicBSONEncoder.putObjectId(String name,
ObjectId objectId)
Encodes an ObjectId field to a
BsonType.OBJECT_ID . |
void |
BsonWriter.writeObjectId(ObjectId objectId)
Writes a BSON ObjectId to the writer.
|
void |
AbstractBsonWriter.writeObjectId(ObjectId objectId) |
void |
BsonWriter.writeObjectId(String name,
ObjectId objectId)
Writes a BSON ObjectId element to the writer.
|
void |
AbstractBsonWriter.writeObjectId(String name,
ObjectId objectId) |
Constructor and Description |
---|
BsonDbPointer(String namespace,
ObjectId id)
Construct a new instance with the given namespace and id.
|
BsonObjectId(ObjectId value)
Construct a new instance with the given
ObjectId instance. |
Modifier and Type | Method and Description |
---|---|
ObjectId |
ObjectIdCodec.decode(BsonReader reader,
DecoderContext decoderContext) |
Modifier and Type | Method and Description |
---|---|
Class<ObjectId> |
ObjectIdCodec.getEncoderClass() |
Modifier and Type | Method and Description |
---|---|
void |
ObjectIdCodec.encode(BsonWriter writer,
ObjectId value,
EncoderContext encoderContext) |
Modifier and Type | Method and Description |
---|---|
ObjectId |
BsonInput.readObjectId()
Reads a BSON ObjectId value from the stream.
|
ObjectId |
ByteBufferBsonInput.readObjectId() |
Modifier and Type | Method and Description |
---|---|
void |
OutputBuffer.writeObjectId(ObjectId value) |
void |
BsonOutput.writeObjectId(ObjectId value)
Writes a BSON ObjectId to the stream.
|
Modifier and Type | Method and Description |
---|---|
protected ObjectId |
JsonReader.doReadObjectId() |
Modifier and Type | Method and Description |
---|---|
void |
JsonWriter.doWriteObjectId(ObjectId objectId) |
Modifier and Type | Method and Description |
---|---|
static ObjectId |
ObjectId.createFromLegacyFormat(int time,
int machine,
int inc)
Creates an ObjectId using time, machine and inc values.
|
static ObjectId |
ObjectId.get()
Gets a new object id.
|
Modifier and Type | Method and Description |
---|---|
int |
ObjectId.compareTo(ObjectId other) |
Copyright © 2016. All Rights Reserved.