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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static UserfindCoordinator(String userID) Finds the coordinator with the specified ID.private static UserfindFaculty(String userID) Finds the faculty with the specified ID.private static UserfindStudent(String userID) Finds the user with the specified ID.static UserFinds 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
-