Examples of dao()


Examples of org.nutz.ngqa.service.CommonMongoService.dao()

public class NgqaSetup implements Setup {

  /**NutzMvc正常启动后就会执行这个方法,你可以认为所有东西都已经准备好了,你可以做一些额外的逻辑,例如启动某些后台线程*/
  public void init(NutConfig config) {
    CommonMongoService commons = config.getIoc().get(CommonMongoService.class, "commons");
    MongoDao dao = commons.dao();
   
    //初始化集合
    dao.create(User.class, false);
    dao.create(Question.class, false);
    dao.create(Answer.class, false);
View Full Code Here

Examples of wwutil.jsoda.Jsoda.dao()

        // Create the corresponding table in the database.  Only need to do this once.
        jsoda.createModelTable(SampleUser.class);

        // Get the Dao object specific to the SampleUser model class.
        Dao<SampleUser> dao = jsoda.dao(SampleUser.class);

        // Save some objects
        dao.put(new SampleUser(101, "Jack", 1));
        dao.put(new SampleUser(102, "Jill", 1));
        dao.put(new SampleUser(103, "Joe", 1));
View Full Code Here

Examples of wwutil.jsoda.Jsoda.dao()

        // Create the table corresponding to the model class.  Only need to do this once.
        jsoda.createModelTable(SampleProduct.class);


        // Save some objects
        Dao<SampleProduct>      dao = jsoda.dao(SampleProduct.class);
        dao.put(new SampleProduct("item1", "Red Shirt", "Premium red shirt", 29.95f));
        dao.put(new SampleProduct("item2", "Tophat", "Tophat for the cat", 90f));
        dao.put(new SampleProduct("item3", "Socks", null, 2.95f));
        dao.put(new SampleProduct("item4", "Steak", "Sizzling steak", 12.95f));
        dao.put(new SampleProduct("item5", null, "product with null name", 0.0f));
View Full Code Here

Examples of wwutil.jsoda.Jsoda.dao()

        // Create the table corresponding to the model class.  Only need to do this once.
        jsoda.createModelTable(SampleProduct2.class);


        // Save some objects
        Dao<SampleProduct2>      dao = jsoda.dao(SampleProduct2.class);
        dao.put(new SampleProduct2("item1", "Red Shirt", "Premium red shirt", "(415) 555-1212", "800-123-4567", 29.95f));
        dao.put(new SampleProduct2("item2", "Tophat", "Tophat for the cat", "(415) 555-1212", "800-789-ABCD", 90f));
        dao.put(new SampleProduct2("item3", "Socks", null, "(415) 555-1212", "800-555-1212", 2.95f));
        dao.put(new SampleProduct2("item4", "Steak", "Sizzling steak", "(415) 555-1212", "800-555-ab$d", 12.95f));
        dao.put(new SampleProduct2("item5", "Tophat", "product with null name", "(415) 555-1212", "800-123-4567", 0.0f));
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.