Constructor and 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 and 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. |
java.lang.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 java.lang.Class<DBRef> getEncoderClass()
Encoder
getEncoderClass
in interface Encoder<DBRef>
public DBRef decode(BsonReader reader, DecoderContext decoderContext)
Decoder
T
.Copyright © 2010 - 2020 Adobe. All Rights Reserved