public class DefaultDBEncoder extends BasicBSONEncoder implements DBEncoder
Modifier and Type | Field and Description |
---|---|
static DBEncoderFactory |
FACTORY |
_buf
Constructor and Description |
---|
DefaultDBEncoder() |
Modifier and Type | Method and Description |
---|---|
protected void |
putDBPointer(String name,
String ns,
ObjectId oid)
Deprecated.
Please see
DBPointer .
You can override putDBRef(String, DBRefBase) if you need
a specific behaviour while decoding database references. |
protected void |
putDBRef(String name,
DBRefBase ref)
Deals with encoding database references.
|
protected boolean |
putSpecial(String name,
Object val)
Special values are not encoded into documents.
|
String |
toString() |
int |
writeObject(OutputBuffer buf,
BSONObject o)
Encode the BSONObject.
|
_put, _put, _putObjectField, _putValueString, done, encode, getOutputBuffer, handleSpecialObjects, putBinary, putBinary, putBoolean, putCode, putCodeWScope, putDate, putNull, putNumber, putObject, putObject, putObjectId, putString, putSymbol, putTimestamp, putUndefined, putUUID, set, writeCString, writeInt, writeLong
public static DBEncoderFactory FACTORY
public int writeObject(OutputBuffer buf, BSONObject o)
DBEncoder
writeObject
in interface DBEncoder
buf
- the OutputBuffer to write too
- the BSONObject to writeprotected boolean putSpecial(String name, Object val)
BasicBSONEncoder
putSpecial
in class BasicBSONEncoder
name
- the field nameval
- the value@Deprecated protected void putDBPointer(String name, String ns, ObjectId oid)
DBPointer
.
You can override putDBRef(String, DBRefBase)
if you need
a specific behaviour while decoding database references.protected void putDBRef(String name, DBRefBase ref)
name
- the name of the field in the documentref
- the database reference object