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
- All Known Implementing Classes: 
- AbstractMongoConverter, MappingMongoConverter, 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(java.lang.Class<S> clazz,
     com.mongodb.DBObject dbo)Ready from the native MongoDB DBObject representation to an instance of the class T.
 | 
 
read
<S extends T> S read(java.lang.Class<S> clazz,
                     com.mongodb.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 DBObjectinto it. So in case there's no real valid data insideDBObjectfor the given type, just return an empty instance of the given type.
 
- 
- Parameters:
- clazz- the type of the return value
- dbo- theDBObject
- Returns:
- the converted object
 
Copyright © 2011. All Rights Reserved.