Package org.nutz.mongo.util

Examples of org.nutz.mongo.util.Moo


          public void invoke(DB arg0) {
            dao.save(_u);
          }
        });
        }
        Moo moo = Moo.SET("lastLoginDate", new Date()).set("email", p.getEmail());
        dao.update(User.class, new BasicDBObject("_id", user.getId()), moo);
       
        session.setAttribute("me", user);
        session.setMaxInactiveInterval(30 * 24 * 60 * 60);
        return user;
View Full Code Here


    answer.setCreatedAt(new Date());
    answer.setUpdatedAt(new Date());
    dao.runNoError(new Callback<DB>() {
      public void invoke(DB db) {
        dao.save(answer);
        Moo moo = Moo.NEW();
        moo.push("answers", new DBRef(db, "answer", new ObjectId(answer.getId())));
        dao.update(Question.class, Moo.NEW("id", questionId), moo);
      }
    });
    commons.fresh(Question.class, questionId);
    return Ajax.ok();
View Full Code Here

TOP

Related Classes of org.nutz.mongo.util.Moo

Copyright © 2018 www.massapicom. 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.