diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/document/mongodb/MongoReader.java b/spring-data-mongodb/src/main/java/org/springframework/data/document/mongodb/MongoReader.java index 834d44ca8..59f7bc8d4 100644 --- a/spring-data-mongodb/src/main/java/org/springframework/data/document/mongodb/MongoReader.java +++ b/spring-data-mongodb/src/main/java/org/springframework/data/document/mongodb/MongoReader.java @@ -18,17 +18,20 @@ package org.springframework.data.document.mongodb; import com.mongodb.DBObject; /** - * A MongoWriter is responsible for converting a native MongoDB DBObject to an object of type T. + * A MongoWriter is responsible for converting a native MongoDB DBObject to an object of type T. * * @author Mark Pollack * @author Thomas Risberg + * @author Oliver Gierke * * @param the type of the object to convert from a DBObject */ public interface MongoReader { /** - * Ready from the native MongoDB DBObject representation to an instance of the class T. + * 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 {@link DBObject} into it. So in case there's no real valid data inside + * {@link DBObject} for the given type, just return an empty instance of the given type. * @param clazz the type of the return value * @param dbo theDBObject * @return the converted object