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

Examples of com.ikanow.infinit.e.data_model.store.social.person.PersonCommunityPojo


      {
        // Get GsonBuilder object with MongoDb de/serializers registered
        PersonPojo person = PersonPojo.fromDb(dbo, PersonPojo.class);

        // Create a new PersonCommunityPojo object
        PersonCommunityPojo community = new PersonCommunityPojo();
        community.set_id(new ObjectId(communityId));
        community.setName(communityName);
       
        // Check to see if person is already a member of the community to be added
        List<PersonCommunityPojo> communities = person.getCommunities();
        Boolean alreadyMember = false;
        for (PersonCommunityPojo c : communities)
View Full Code Here


      catch (Exception e) {} // Do nothing, will have to update the user to stop bad things from happening on query though
     
      //write community to db
      DbManager.getSocial().getCommunity().insert(selfCommunity.toDb());
      //update user to be in this community
      PersonCommunityPojo pcpSelf = new PersonCommunityPojo(person.get_id(), selfCommunity.getName());
      person.getCommunities().add(pcpSelf);
      /////////////////////////////////////////////////////////////////////////////////////////////////
      // TODO (INF-1214): Make this code more robust to handle changes to the community that need to
      // Caleb: this means change update to $set
      /////////////////////////////////////////////////////////////////////////////////////////////////
View Full Code Here

TOP

Related Classes of com.ikanow.infinit.e.data_model.store.social.person.PersonCommunityPojo

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.