Example usage for com.mongodb DBRef toString

List of usage examples for com.mongodb DBRef toString

Introduction

In this page you can find the example usage for com.mongodb DBRef toString.

Prototype

@Override
    public String toString() 

Source Link

Usage

From source file:com.restfeel.controller.rest.EntityDataController.java

License:Apache License

private DBObject dbRefToRel(DBRef obj) {
    return new BasicDBObject().append("_rel",
            new BasicDBObject().append("entity", (obj.toString()).split("_")[1]).append("_id",
                    ((ObjectId) obj.getId()).toHexString()));
}