| 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  Tinto 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)
EncoderT into a BSON value.public Class<DBRef> getEncoderClass()
EncodergetEncoderClass in interface Encoder<DBRef>public DBRef decode(BsonReader reader, DecoderContext decoderContext)
DecoderT.