|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.vz.mongodb.jackson.DBRef<T,K>
public class DBRef<T,K>
A database reference object
Constructor Summary | |
---|---|
DBRef(K id,
Class<T> type)
Construct a new database reference with the given id and type. |
|
DBRef(K id,
String collectionName)
Construct a new database reference with the given id and collection name |
Method Summary | |
---|---|
T |
fetch()
Fetch the object. |
T |
fetch(com.mongodb.DBObject fields)
Fetch only the given fields of the object. |
String |
getCollectionName()
Get the name of the collection this object lives in |
K |
getId()
Get the ID of this object |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DBRef(K id, String collectionName)
id
- The id of the database reference to constructcollectionName
- The name of the collectionpublic DBRef(K id, Class<T> type) throws MongoJsonMappingException
MongoCollection
, so that the name can be worked out.
id
- The id of the database reference to constructtype
- The type of the object
MongoJsonMappingException
- If no MongoCollection annotation is found on the typeMethod Detail |
---|
public K getId()
public String getCollectionName()
public T fetch()
public T fetch(com.mongodb.DBObject fields)
fetch()
method, calls to this are not cached.
fields
- The fields to fetch
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |