Package main.controller.account.user
Class UserAdder
java.lang.Object
main.controller.account.user.UserAdder
The UserAdder class provides a utility for adding users to the database.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static void
addCoordinator
(Coordinator coordinator) Adds the specified coordinator to the database.private static void
addStudent
(Student student) Adds the specified student to the database.private static void
addSupervisor
(Supervisor supervisor) Adds the specified supervisor to the database.static void
Adds the specified user to the database.
-
Constructor Details
-
UserAdder
public UserAdder()
-
-
Method Details
-
addUser
Adds the specified user to the database.- Parameters:
user
- the user to be added- Throws:
ModelAlreadyExistsException
- if the user already exists in the database
-
addCoordinator
Adds the specified coordinator to the database.- Parameters:
coordinator
- the coordinator to be added- Throws:
ModelAlreadyExistsException
- if the coordinator already exists in the database
-
addSupervisor
Adds the specified supervisor to the database.- Parameters:
supervisor
- the supervisor to be added- Throws:
ModelAlreadyExistsException
- if the supervisor already exists in the database
-
addStudent
Adds the specified student to the database.- Parameters:
student
- the student to be added- Throws:
ModelAlreadyExistsException
- if the student already exists in the database
-