public DBCursor setDecoderFactory(final DBDecoderFactory factory) {
        this.decoderFactory = factory;

        //Not creating new CompoundDBObjectCodec because we don't care about encoder.
        this.decoder = new DBDecoderAdapter(factory.create(), collection, getCollection().getBufferPool());
        return this;
    }
public DBCursor setDecoderFactory(final DBDecoderFactory factory) {
        this.decoderFactory = factory;

        
        this.decoder = new DBDecoderAdapter(factory.create(), collection, getCollection().getBufferPool());
        return this;
    }
public DBCursor setDecoderFactory ( final DBDecoderFactory factory ) { this . decoderFactory = factory ; //Not creating new CompoundDBObjectCodec because we don't care about encoder. this . decoder = new DBDecoderAdapter ( factory . create ( ) , collection , getCollection ( ) . getBufferPool ( ) ) ; return this ; }
Sets the factory that will be used create a {@code DBDecoder} that will be used to decode BSON documents into DBObject instances.

@param factory the DBDecoderFactory
@return {@code this} so calls can be chained
Sets the factory that will be used create a { @code DBDecoder } that will be used to decode BSON documents into DBObject instances .