Example usage for com.mongodb DefaultDBDecoder FACTORY

List of usage examples for com.mongodb DefaultDBDecoder FACTORY

Introduction

In this page you can find the example usage for com.mongodb DefaultDBDecoder FACTORY.

Prototype

DBDecoderFactory FACTORY

To view the source code for com.mongodb DefaultDBDecoder FACTORY.

Click Source Link

Usage

From source file:org.fastmongo.odm.bson.repository.BsonDbDecoder.java

License:Apache License

private DBDecoder getDefaultDbDecoder() {
    return DefaultDBDecoder.FACTORY.create();
}

From source file:org.fastmongo.odm.bson.repository.BsonDbObject.java

License:Apache License

private DBObject convertToDbObject() {
    return DefaultDBDecoder.FACTORY.create().decode(data, (DBCollection) null);
}

From source file:org.jongo.bench.DecoderBench.java

License:Apache License

public void timeDecodeWithDriver(int reps) {

    for (int i = 0; i < reps; i++) {

        DBObject dbo = decode(DefaultDBDecoder.FACTORY);
        DBObject coord = (DBObject) dbo.get("coordinate");
        Coordinate coordinate = new Coordinate((Integer) coord.get("lat"), (Integer) coord.get("lng"));
        Friend f = new Friend((String) dbo.get("name"), (String) dbo.get("address"), coordinate);
    }//  w  ww  . j  ava2 s  .co m
}