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 TypeMethodDescriptionvoid
deleteFriendForUser
(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
- theUser
offset
- the offsetcount
- the number of results to return- Returns:
- a
Pagination<Friend>
-
getFriendsForUser
- Parameters:
user
- theUser
offset
- the offsetcount
- the number of results to returnsearch
- the search query which will be used to filter the returnedFriend
instances- Returns:
- a
Pagination<Friend>
-
getFriendForUser
Returns a single instance ofFriend
for the suppliedUser
. Throwing aNotFoundException
if the friend does not exist for the suppliedUser
.- Parameters:
user
- theUser
friendId
- the id of the friend as returned byFriend.getId()
- Returns:
- the
Friend
instance, never null
-
deleteFriendForUser
Deletes the single instance ofFriend
for the suppliedUser
. Throwing aNotFoundException
if the friend does not exist for the suppliedUser
.- Parameters:
user
- theUser
friendId
- the id of the friend as returned byFriend.getId()
-