Constructor | Description |
---|---|
DBRefCodec(CodecRegistry registry) |
Construct an instance with the given registry, which is used to encode the id of the referenced document.
|
Modifier and Type | Method | Description |
---|---|---|
DBRef |
decode(BsonReader reader,
DecoderContext decoderContext) |
Decodes a BSON value from the given reader into an instance of the type parameter
T . |
void |
encode(BsonWriter writer,
DBRef value,
EncoderContext encoderContext) |
Encode an instance of the type parameter
T into a BSON value. |
Class<DBRef> |
getEncoderClass() |
Returns the Class instance that this encodes.
|
public DBRefCodec(CodecRegistry registry)
registry
- the non-null codec registrypublic void encode(BsonWriter writer, DBRef value, EncoderContext encoderContext)
Encoder
T
into a BSON value.public Class<DBRef> getEncoderClass()
Encoder
getEncoderClass
in interface Encoder<DBRef>
public DBRef decode(BsonReader reader, DecoderContext decoderContext)
Decoder
T
.