Package main.controller.account.user
Class UserFinder
java.lang.Object
main.controller.account.user.UserFinder
A class that provides a utility for finding users in the database.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static User
findCoordinator
(String userID) Finds the coordinator with the specified ID.private static User
findFaculty
(String userID) Finds the faculty with the specified ID.private static User
findStudent
(String userID) Finds the user with the specified ID.static User
Finds the user with the specified ID.
-
Constructor Details
-
UserFinder
public UserFinder()
-
-
Method Details
-
findStudent
Finds the user with the specified ID.- Parameters:
userID
- the ID of the user to be found- Returns:
- the user with the specified ID
- Throws:
ModelNotFoundException
- if the user is not found
-
findFaculty
Finds the faculty with the specified ID.- Parameters:
userID
- the ID of the faculty to be found- Returns:
- the faculty with the specified ID
- Throws:
ModelNotFoundException
- if the faculty is not found
-
findCoordinator
Finds the coordinator with the specified ID.- Parameters:
userID
- the ID of the coordinator to be found- Returns:
- the coordinator with the specified ID
- Throws:
ModelNotFoundException
- if the coordinator is not found
-
findUser
Finds the user with the specified ID.- Parameters:
userID
- the ID of the user to be founduserType
- the type of the user to be found- Returns:
- the user with the specified ID
- Throws:
ModelNotFoundException
- if the user is not found
-