Package | Description |
---|---|
com.mongodb |
Main package with core files.
|
com.mongodb.gridfs |
GridFS tools.
|
org.bson |
Contains the base BSON classes and Encoder/Decoder.
|
org.bson.types |
Contains classes implementing various BSON types.
|
Modifier and Type | Method and Description |
---|---|
ObjectId |
DBPointer.getId()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
Object |
LazyDBCallback.createDBRef(String ns,
ObjectId id) |
void |
DefaultDBCallback.gotDBRef(String name,
String ns,
ObjectId id) |
protected void |
DefaultDBEncoder.putDBPointer(String name,
String ns,
ObjectId oid)
Deprecated.
Please see
DBPointer .
You can override DefaultDBEncoder.putDBRef(String, DBRefBase) if you need
a specific behaviour while decoding database references. |
Constructor and Description |
---|
DBPointer(String ns,
ObjectId id)
Deprecated.
CTOR used for testing BSON encoding.
|
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 |
---|---|
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.
|
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).
|
ObjectId |
BasicBSONObject.getObjectId(String field,
ObjectId def)
Returns the object id or def if not set.
|
void |
BSONCallback.gotDBRef(String name,
String ns,
ObjectId id)
Invoked when
BSONDecoder encountered a DBPointer(0x0c) type field in a byte sequence. |
void |
EmptyBSONCallback.gotDBRef(String name,
String ns,
ObjectId id) |
void |
BasicBSONCallback.gotDBRef(String name,
String ns,
ObjectId id) |
void |
BSONCallback.gotObjectId(String name,
ObjectId id)
Called when reading a field with an ObjectID value.
|
void |
EmptyBSONCallback.gotObjectId(String name,
ObjectId id) |
void |
BasicBSONCallback.gotObjectId(String name,
ObjectId id) |
protected void |
BasicBSONEncoder.putObjectId(String name,
ObjectId oid)
Encodes an ObjectId field to an OBJECT_ID.
|
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.
|
static ObjectId |
ObjectId.massageToObjectId(Object o)
Deprecated.
This method is NOT a part of public API and will be dropped in 3.x versions.
|
Modifier and Type | Method and Description |
---|---|
int |
ObjectId.compareTo(ObjectId id) |
Copyright © 2023. All rights reserved.