org.springframework.data.document.mongodb
Interface MongoReader<T>
- Type Parameters:
T
- the type of the object to convert from a DBObject
- All Known Subinterfaces:
- MongoConverter, MongoReaderWriter<T>
- All Known Implementing Classes:
- SimpleMongoConverter
public interface MongoReader<T>
A MongoWriter is responsible for converting a native MongoDB DBObject to an object of type T.
- Author:
- Mark Pollack, Thomas Risberg, Oliver Gierke
Method Summary |
|
read(Class<S> clazz,
DBObject dbo)
Ready from the native MongoDB DBObject representation to an instance of the class T. |
read
<S extends T> S read(Class<S> clazz,
DBObject dbo)
- Ready from the native MongoDB DBObject representation to an instance of the class T. The given type has to be the
starting point for marshalling the
DBObject
into it. So in case there's no real valid data inside
DBObject
for the given type, just return an empty instance of the given type.
- Parameters:
clazz
- the type of the return valuedbo
- theDBObject
- Returns:
- the converted object
Copyright © 2011. All Rights Reserved.