SpringSource/spring-data-mongodb — pull request #66 by cngo-github (2013-08-17 20:42:26+00:00)
Title: Additions to MongoTemplate and MongoOperations and new SimpleMongoConfiguration class

Added 3 methods to MongoTemplate and their declarations to MongoOperations to allow the passing in an entity object along with a collection name. The methods then converts the entity object using regisitered converters.

updateMulti(Query query, Object entity, class entityClass, String collectionName)
updateFirst(Query query, Object entity, class entityClass, String collectionName)
upsert(Query query, Object entity, class entityClass, String collectionName)

Created a new class that extends AbstractMongoConfiguration and allows for the creation of a MongoTemplate with custom converters in Java. If no Mongo is provided, a default one accessing the localhost on the default port will be used. If no database is specified, the database "test" will be used.

/src/main/java/org/springframework/data/mongodb/config/SimpleMongoConfiguration.java

- Chuong Ngo