DATADOC-239 - Clarify documentation of passed in values for MongoReader.

This commit is contained in:
Oliver Gierke
2011-08-12 20:06:04 +02:00
parent eb276841dd
commit d237ee80c8
2 changed files with 6 additions and 7 deletions

View File

@@ -1252,6 +1252,8 @@ public class MongoTemplate implements MongoOperations, ApplicationContextAware {
private final Class<T> type;
public ReadDbObjectCallback(MongoReader<? super T> reader, Class<T> type) {
Assert.notNull(reader);
Assert.notNull(type);
this.reader = reader;
this.type = type;
}

View File

@@ -20,8 +20,7 @@ import com.mongodb.DBObject;
/**
* A MongoWriter is responsible for converting a native MongoDB DBObject to an object of type T.
*
* @param <T>
* the type of the object to convert from a DBObject
* @param <T> the type of the object to convert from a DBObject
* @author Mark Pollack
* @author Thomas Risberg
* @author Oliver Gierke
@@ -33,11 +32,9 @@ public interface MongoReader<T> {
* 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
* @param clazz the type of the return value. Will never be {@literal null}.
* @param dbo the {@link DBObject} to convert into a domain object. Might be {@literal null}.
* @return the converted object. Might be {@literal null}.
*/
<S extends T> S read(Class<S> clazz, DBObject dbo);
}