Package dev.getelements.elements.sdk.dao
Interface FollowerDao
- All Known Implementing Classes:
MongoFollowerDao
public interface FollowerDao
-
Method Summary
Modifier and TypeMethodDescriptionvoid
createFollowerForProfile
(String profileId, String followedProfileId) Creates a single instance ofCreateFollowerRequest
for the supplied profile id and toFollow id.void
deleteFollowerForProfile
(String profileId, String profileToUnfollowId) Deletes the single instance ofCreateFollowerRequest
for the supplied profile id.getFolloweesForProfile
(String profileId, int offset, int count) Fetches all followees for the supplied profile.getFollowerForProfile
(String profileId, String followedId) FetchesProfile
instance for the supplied profile id and followed id.getFollowersForProfile
(String profileId, int offset, int count) Fetches all followers for the supplied profile.
-
Method Details
-
getFollowersForProfile
Fetches all followers for the supplied profile.- Parameters:
profileId
- the id of the logged in profileoffset
- the offsetcount
- the number of results to return- Returns:
- a
Pagination
-
getFolloweesForProfile
Fetches all followees for the supplied profile.- Parameters:
profileId
- the id of the logged in profileoffset
- the offsetcount
- the number of results to return- Returns:
- a
Pagination
-
getFollowerForProfile
FetchesProfile
instance for the supplied profile id and followed id. Throwing aNotFoundException
if the follower does not exist for the supplied profile id.- Parameters:
profileId
- the id of the logged in profilefollowedId
- the id of the followed profile- Returns:
- a
Profile
-
createFollowerForProfile
Creates a single instance ofCreateFollowerRequest
for the supplied profile id and toFollow id.- Parameters:
profileId
- the profile idfollowedProfileId
- the object to insert into the db
-
deleteFollowerForProfile
Deletes the single instance ofCreateFollowerRequest
for the supplied profile id. Throwing aNotFoundException
if the follower does not exist for the supplied profile id.- Parameters:
profileId
- the id of the logged in profileprofileToUnfollowId
- the id of the profile to unfollow
-