Package org.springframework.data.mongodb.core

Examples of org.springframework.data.mongodb.core.MongoTemplate.execute()


    List<Map<String, Object>> l = (List<Map<String, Object>>) dataMap.get("records");
    for (Map<String, Object> m : l) {
      Map<String, Object> rec = (Map<String, Object>) m.get("record");
      final BasicDBObject dbo = new BasicDBObject();
      dbo.putAll(rec);
      mongoTemplate.execute("records", new CollectionCallback<Object>() {
        public Object doInCollection(DBCollection collection) throws MongoException, DataAccessException {
          collection.insert(dbo);
          return null;
        }
      });
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.