Package com.ikanow.infinit.e.data_model.store.social.gui

Examples of com.ikanow.infinit.e.data_model.store.social.gui.UIModulePojo.toDb()


    {
      for ( int i = 0; i < moduleids.size(); i++ //loop through all the ids sent in, and grab the module   
      {
        UIModulePojo moduleQuery = new UIModulePojo();
        moduleQuery.set_id(moduleids.get(i));
        DBObject dbo = DbManager.getSocial().getUIModules().findOne(moduleQuery.toDb());
        if ( dbo != null) {
          UIModulePojo module = UIModulePojo.fromDb(dbo,UIModulePojo.class);
          if (null != module.getCommunityIds()) {
            if (bAdmin) {
              mods.add(module);
View Full Code Here


         
          // Check if it exists (uniquely defined by url + owner)
          UIModulePojo queryModule = new UIModulePojo();
          queryModule.setUrl(module.getUrl());
          queryModule.setAuthor(userName);
          BasicDBObject oldModuleDbo = (BasicDBObject) DbManager.getSocial().getUIModules().findOne(queryModule.toDb());
         
          if (null == oldModuleDbo) { // New module
            module.set_id(new ObjectId());
            module.setCreated(new Date());
            //DEBUG
View Full Code Here

        }//TESTED
        else { // Check if it already exists, owner must match if so

          UIModulePojo moduleQuery = new UIModulePojo();
          moduleQuery.set_id(module.get_id());
          BasicDBObject oldModuleDbo = (BasicDBObject) DbManager.getSocial().getUIModules().findOne(moduleQuery.toDb());
          if (null == oldModuleDbo) {
            // Fine, carry on
            //DEBUG
            //System.out.println("Id specified for new module: " + module.get_id());
          }//TESTED
View Full Code Here

    ResponsePojo rp = new ResponsePojo();
    try
    {
      UIModulePojo moduleQuery = new UIModulePojo();
      moduleQuery.set_id(new ObjectId(moduleId));
      BasicDBObject oldModuleDbo = (BasicDBObject) DbManager.getSocial().getUIModules().findOne(moduleQuery.toDb());
      if (null == oldModuleDbo) {
        rp.setResponse(new ResponseObject("Delete Module",false,"Module doesn't exist"));
        return rp;
      }//TESTED
      UIModulePojo oldModule = UIModulePojo.fromDb(oldModuleDbo, UIModulePojo.class);
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.