Class MongoFollowerDao

java.lang.Object
dev.getelements.elements.dao.mongo.MongoFollowerDao
All Implemented Interfaces:
FollowerDao

public class MongoFollowerDao extends Object implements FollowerDao
  • Constructor Details

    • MongoFollowerDao

      public MongoFollowerDao()
  • Method Details

    • getFollowersForProfile

      public Pagination<Profile> getFollowersForProfile(String profileId, int offset, int count)
      Description copied from interface: FollowerDao
      Fetches all followers for the supplied profile.
      Specified by:
      getFollowersForProfile in interface FollowerDao
      Parameters:
      profileId - the id of the logged in profile
      offset - the offset
      count - the number of results to return
      Returns:
      a Pagination
    • getFolloweesForProfile

      public Pagination<Profile> getFolloweesForProfile(String profileId, int offset, int count)
      Description copied from interface: FollowerDao
      Fetches all followees for the supplied profile.
      Specified by:
      getFolloweesForProfile in interface FollowerDao
      Parameters:
      profileId - the id of the logged in profile
      offset - the offset
      count - the number of results to return
      Returns:
      a Pagination
    • getFollowerForProfile

      public Profile getFollowerForProfile(String profileId, String followedId)
      Description copied from interface: FollowerDao
      Fetches Profile instance for the supplied profile id and followed id. Throwing a NotFoundException if the follower does not exist for the supplied profile id.
      Specified by:
      getFollowerForProfile in interface FollowerDao
      Parameters:
      profileId - the id of the logged in profile
      followedId - the id of the followed profile
      Returns:
      a Profile
    • aggregateMutualFollowers

      public dev.morphia.aggregation.Aggregation<?> aggregateMutualFollowers(MongoProfile mongoProfile)
    • createFollowerForProfile

      public void createFollowerForProfile(String profileId, String followedProfileId)
      Description copied from interface: FollowerDao
      Creates a single instance of CreateFollowerRequest for the supplied profile id and toFollow id.
      Specified by:
      createFollowerForProfile in interface FollowerDao
      Parameters:
      profileId - the profile id
      followedProfileId - the object to insert into the db
    • deleteFollowerForProfile

      public void deleteFollowerForProfile(String profileId, String profileToUnfollowId)
      Description copied from interface: FollowerDao
      Deletes the single instance of CreateFollowerRequest for the supplied profile id. Throwing a NotFoundException if the follower does not exist for the supplied profile id.
      Specified by:
      deleteFollowerForProfile in interface FollowerDao
      Parameters:
      profileId - the id of the logged in profile
      profileToUnfollowId - the id of the profile to unfollow
    • getDatastore

      public dev.morphia.Datastore getDatastore()
    • setDatastore

      @Inject public void setDatastore(dev.morphia.Datastore datastore)
    • getMongoDBUtils

      public MongoDBUtils getMongoDBUtils()
    • setMongoDBUtils

      @Inject public void setMongoDBUtils(MongoDBUtils mongoDBUtils)
    • getDozerMapper

      public MapperRegistry getDozerMapper()
    • setDozerMapper

      @Inject public void setDozerMapper(MapperRegistry dozerMapperRegistry)
    • getMongoProfileDao

      public MongoProfileDao getMongoProfileDao()
    • setMongoProfileDao

      @Inject public void setMongoProfileDao(MongoProfileDao mongoProfileDao)