public class DefaultDBEncoder extends BasicBSONEncoder implements DBEncoder
Modifier and Type | Field and Description |
---|---|
static DBEncoderFactory |
FACTORY |
Constructor and Description |
---|
DefaultDBEncoder() |
Modifier and Type | Method and Description |
---|---|
protected void |
putDBRef(String name,
DBRef ref)
Deals with encoding database references.
|
protected boolean |
putSpecial(String name,
Object value)
Special values are not encoded into documents.
|
String |
toString() |
int |
writeObject(OutputBuffer outputBuffer,
BSONObject document)
Encode the BSONObject.
|
_putObjectField, done, encode, getBsonWriter, getOutputBuffer, putArray, putBinary, putBinary, putBoolean, putCode, putCodeWScope, putDate, putDecimal128, putIterable, putMap, putMaxKey, putMinKey, putName, putNull, putNumber, putObject, putObject, putObjectId, putPattern, putString, putSymbol, putTimestamp, putUndefined, putUUID, set
public static final DBEncoderFactory FACTORY
public int writeObject(OutputBuffer outputBuffer, BSONObject document)
DBEncoder
writeObject
in interface DBEncoder
outputBuffer
- the OutputBuffer to write todocument
- the BSONObject to writeprotected boolean putSpecial(String name, Object value)
BasicBSONEncoder
putSpecial
in class BasicBSONEncoder
name
- the field namevalue
- the valueprotected void putDBRef(String name, DBRef ref)
name
- the name of the field in the documentref
- the database reference object