net.vz.mongodb.jackson.internal
Class FetchableDBRef<T,K>
java.lang.Object
net.vz.mongodb.jackson.DBRef<T,K>
net.vz.mongodb.jackson.internal.FetchableDBRef<T,K>
public class FetchableDBRef<T,K>
- extends DBRef<T,K>
DBRef that can be fetched
- Since:
- 1.2
- Author:
- James Roper
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FetchableDBRef
public FetchableDBRef(K id,
JacksonDBCollection<T,K> dbCollection)
fetch
public T fetch()
- Description copied from class:
DBRef
- Fetch the object. Should only be called for references that have been returned by the mapper, will return null
otherwise.
Deserialisation is done by the ObjectMapper that fetched the object that this reference belongs to.
- Overrides:
fetch
in class DBRef<T,K>
- Returns:
- If this DBRef was returned by the mapper, the referenced object, if it exists, or null
fetch
public T fetch(com.mongodb.DBObject fields)
- Description copied from class:
DBRef
- Fetch only the given fields of the object. Should only be called for references that have been returned by the
mapper, will return null otherwise.
Deserialisation is done by the ObjectMapper that fetched the object that this reference belongs to.
Unlike the
fetch()
method, calls to this are not cached.
- Overrides:
fetch
in class DBRef<T,K>
- Parameters:
fields
- The fields to fetch
- Returns:
- If this DBRef was returned by the mapper, the referenced object, if it exists, or null
getCollectionKey
public JacksonCollectionKey getCollectionKey()
Copyright © 2011-2012 VZ Netzwerke. All Rights Reserved.