Examples of toDb()


Examples of com.ikanow.infinit.e.data_model.store.social.person.PersonPojo.toDb()

    try
    {
      // Find person record to update
      PersonPojo personQuery = new PersonPojo();
      personQuery.set_id(new ObjectId(personId));
      DBObject dbo = DbManager.getSocial().getPerson().findOne(personQuery.toDb());
     
      if (dbo != null)
      {
        PersonPojo person = PersonPojo.fromDb(dbo, PersonPojo.class);
       
View Full Code Here

Examples of com.ikanow.infinit.e.data_model.store.social.person.PersonPojo.toDb()

        if (alreadyMember)
        {
          //TODO (INF-1214): (not thread safe)         
          communities.remove(communityIndex)
          person.setModified(new Date());         
          DbManager.getSocial().getPerson().update(personQuery.toDb(), person.toDb());
          rp.setData(person, new PersonPojoApiMap());
          rp.setResponse(new ResponseObject("Remove community status",true,"Community removed successfully."))
        }         
        else
        {
View Full Code Here

Examples of com.ikanow.infinit.e.data_model.store.social.sharing.SharePojo.toDb()

          toModify.setLastDocIdInserted(maxDocId);
         
          // We've modified the share so update it:
          savedQueryShare.setShare(toModify.toApi());
          savedQueryShare.setModified(new Date());
          DbManager.getSocial().getShare().save(savedQueryShare.toDb());
         
        }//(end found some docs)
       
      }//(end found share)
     
View Full Code Here

Examples of com.ikanow.infinit.e.data_model.store.social.sharing.SharePojo.toDb()

      queryShare.setType("infinite-saved-query");
      queryShare.setTitle("test query " + testNum);
      queryShare.setDescription("test query " + testNum);
      queryShare.setShare(query.getQueryInfo().getQuery().toApi());   
      addSocial(queryShare);
      DbManager.getSocial().getShare().save(queryShare.toDb());

      query.getQueryInfo().setQuery(null);
    }
   
    // Build a template share
View Full Code Here

Examples of com.ikanow.infinit.e.data_model.store.social.sharing.SharePojo.toDb()

    share.setTitle("test" + testNum);
    share.setDescription("test1" + testNum);
    share.setShare(query.toApi());   
    addSocial(share);
   
    DbManager.getSocial().getShare().save(share.toDb());
  }
  private static void addSocial(SharePojo share) {
    ShareOwnerPojo person = new ShareOwnerPojo();
    person.set_id(new ObjectId("4e3706c48d26852237078005")); // (admin)
    person.setEmail("infinite_default@ikanow.com");
View Full Code Here

Examples of com.ikanow.infinit.e.data_model.store.social.sharing.SharePojo.toDb()

      //Save the binary objects into separate db
      ObjectId gridid = saveGridFile(bytes);
      share.setBinaryId(gridid);
     
      // Save the document to the share collection
      DbManager.getSocial().getShare().save(share.toDb());
      rp.setResponse(new ResponseObject("Share", true, "New binary share added successfully. ID in data field"));
      rp.setData(id.toString(), null);
    }
    catch (Exception e)
    {
View Full Code Here

Examples of com.ikanow.infinit.e.data_model.store.social.sharing.SharePojo.toDb()

        share.setDescription(description);
        share.setMediaType(mediatype);
        share.setBinaryData(null);
        share.setBinaryId(updateGridFile(share.getBinaryId(), bytes));
       
        DbManager.getSocial().getShare().update(query, share.toDb());
       
        rp.setResponse(new ResponseObject("Update Share", true, "Binary share updated successfully"));
      }
      else
      {
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.