Package dev.getelements.elements.sdk.dao
Interface FriendDao
- All Known Implementing Classes:
MongoFriendDao
public interface FriendDao
Provides database-level access to
Friend instances.-
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteFriendForUser(User user, String friendId) getFriendForUser(User user, String friendId) getFriendsForUser(User user, int offset, int count) getFriendsForUser(User user, int offset, int count, String search)
-
Method Details
-
getFriendsForUser
- Parameters:
user- theUseroffset- the offsetcount- the number of results to return- Returns:
- a
Pagination<Friend>
-
getFriendsForUser
- Parameters:
user- theUseroffset- the offsetcount- the number of results to returnsearch- the search query which will be used to filter the returnedFriendinstances- Returns:
- a
Pagination<Friend>
-
getFriendForUser
Returns a single instance ofFriendfor the suppliedUser. Throwing aNotFoundExceptionif the friend does not exist for the suppliedUser.- Parameters:
user- theUserfriendId- the id of the friend as returned byFriend.getId()- Returns:
- the
Friendinstance, never null
-
deleteFriendForUser
Deletes the single instance ofFriendfor the suppliedUser. Throwing aNotFoundExceptionif the friend does not exist for the suppliedUser.- Parameters:
user- theUserfriendId- the id of the friend as returned byFriend.getId()
-