public class

DBRef

extends DBRefBase
java.lang.Object
   ↳ com.mongodb.DBRefBase
     ↳ com.mongodb.DBRef

Class Overview

overrides DBRefBase to understand a BSONObject representation of a reference.

Summary

Public Constructors
DBRef(DB db, BSONObject o)
Creates a DBRef
DBRef(DB db, String ns, Object id)
Creates a DBRef
Public Methods
static DBObject fetch(DB db, DBObject ref)
fetches a referenced object from the database
[Expand]
Inherited Methods
From class com.mongodb.DBRefBase
From class java.lang.Object

Public Constructors

public DBRef (DB db, BSONObject o)

Creates a DBRef

Parameters
db the database
o a BSON object representing the reference

public DBRef (DB db, String ns, Object id)

Creates a DBRef

Parameters
db the database
ns the namespace where the object is stored
id the object id

Public Methods

public static DBObject fetch (DB db, DBObject ref)

fetches a referenced object from the database

Parameters
db the database
ref the reference