Interface ProfileSearchDataAccess
-
- All Known Implementing Classes:
ProfileSearchDataAccessImpl
public interface ProfileSearchDataAccess
An abstraction of the persistance/data access features supported by this micro-service.- Author:
- swaroop_nath
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description User
fetchUserByID(String userID)
This abstraction lets fetching of user by the id.boolean
updateCircleForUsers(User currentUser, User targetUser)
This abstraction lets addition of user in circle.
-
-
-
Method Detail
-
fetchUserByID
User fetchUserByID(String userID) throws SearchFailedException, UserDoesNotExistException
This abstraction lets fetching of user by the id. This can be used to search for a user.- Parameters:
userID
- The id of the user to be fetched.- Returns:
- Returns the associated user.
- Throws:
SearchFailedException
- Thrown in case the search for the user failed.UserDoesNotExistException
- Thrown in case any user doesn't exist against the user id.
-
updateCircleForUsers
boolean updateCircleForUsers(User currentUser, User targetUser) throws UserNotAddedToCircleException
This abstraction lets addition of user in circle.- Parameters:
currentUser
- The currently logged in user.targetUser
- The user intended to be added in the circle.- Returns:
- Returns true in case the addition was successful.
- Throws:
UserNotAddedToCircleException
- Thrown in case users couldn't be added in their circles.
-
-