Interface FollowerDao

All Known Implementing Classes:
MongoFollowerDao

public interface FollowerDao
  • Method Details

    • getFollowersForProfile

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

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

      Profile getFollowerForProfile(String profileId, String followedId)
      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.
      Parameters:
      profileId - the id of the logged in profile
      followedId - the id of the followed profile
      Returns:
      a Profile
    • createFollowerForProfile

      void createFollowerForProfile(String profileId, String followedProfileId)
      Creates a single instance of CreateFollowerRequest for the supplied profile id and toFollow id.
      Parameters:
      profileId - the profile id
      followedProfileId - the object to insert into the db
    • deleteFollowerForProfile

      void deleteFollowerForProfile(String profileId, String profileToUnfollowId)
      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.
      Parameters:
      profileId - the id of the logged in profile
      profileToUnfollowId - the id of the profile to unfollow