Package com.mongodb
Class DefaultDBEncoder
- java.lang.Object
-
- org.bson.BasicBSONEncoder
-
- com.mongodb.DefaultDBEncoder
-
-
Field Summary
Fields Modifier and Type Field Description static DBEncoderFactoryFACTORY
-
Constructor Summary
Constructors Constructor Description DefaultDBEncoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidputDBRef(String name, com.mongodb.DBRef ref)Deals with encoding database references.protected booleanputSpecial(String name, Object value)StringtoString()intwriteObject(org.bson.io.OutputBuffer outputBuffer, org.bson.BSONObject document)Encode the BSONObject.-
Methods inherited from class org.bson.BasicBSONEncoder
_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
-
-
-
-
Field Detail
-
FACTORY
public static final DBEncoderFactory FACTORY
-
-
Method Detail
-
writeObject
public int writeObject(org.bson.io.OutputBuffer outputBuffer, org.bson.BSONObject document)Description copied from interface:DBEncoderEncode the BSONObject.- Specified by:
writeObjectin interfaceDBEncoder- Parameters:
outputBuffer- the OutputBuffer to write todocument- the BSONObject to write- Returns:
- the number of characters in the encoding
-
putSpecial
protected boolean putSpecial(String name, Object value)
- Overrides:
putSpecialin classorg.bson.BasicBSONEncoder
-
putDBRef
protected void putDBRef(String name, com.mongodb.DBRef ref)
Deals with encoding database references.- Parameters:
name- the name of the field in the documentref- the database reference object
-
-