Package src.controller
Class UserController
java.lang.Object
src.controller.UserController
UserController Class that handles CRUD operations for
User.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCreate aCareerCenterStaffvoidCreate aCompanyRepresentativevoidcreateStudent(Student student) Create aStudentGet allCompanyRepresentatives in the database.Get allCompanyRepresentatives in the database that has a specifiedstatus.Get allStudents in the database.getUsers()Get allUsers in the database.Acts as a login function
-
Field Details
-
db
-
-
Constructor Details
-
UserController
Constructs aUserControllerfrom the givenDatabase- Parameters:
db- TheDatabaseused.
-
-
Method Details
-
createStudent
Create aStudent- Parameters:
student- theStudentto create
-
createCompanyRep
Create aCompanyRepresentative- Parameters:
rep- theCompanyRepresentativeto create
-
createCareerCenterStaff
Create aCareerCenterStaff- Parameters:
staff- theCareerCenterStaffto create
-
getUsers
Get allUsers in the database.- Returns:
- An
ArrayListwith allUsers in the database.
-
getStudents
Get allStudents in the database.- Returns:
- An
ArrayListwith allStudents in the database.
-
getCompanyRepresentatives
Get allCompanyRepresentatives in the database.- Returns:
- An
ArrayListwith allCompanyRepresentatives in the database.
-
getCompanyRepresentativesByStatus
Get allCompanyRepresentatives in the database that has a specifiedstatus.- Parameters:
status- The status of theCompanyRepresentatives.- Returns:
- An
ArrayListwith allCompanyRepresentatives in the database that satisfy the criteria.
-
login
Acts as a login function
-