Package src.controller
Class Database
java.lang.Object
src.controller.Database
The
Database class contains the instances of all objects in the program.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ArrayList<InternshipApplication> private ArrayList<InternshipOpportunity> private ArrayList<CompanyRepresentative> private ArrayList<CareerCenterStaff> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCreates aCareerCenterStaffin the databasevoidCreates aCompanyRepresentativein the databasevoidcreateInternshipApplication(InternshipApplication application) Creates aInternshipApplicationin the databasevoidcreateInternshipOpportunity(InternshipOpportunity opportunity) Creates aInternshipOpportunityin the databasevoidcreateStudent(Student student) Creates aStudentin the databasevoidDeletes aCareerCenterStafffrom the database.voidDeletes aCompanyRepresentativefrom the database.voiddeleteInternshipApplication(InternshipApplication application) Deletes aInternshipApplicationfrom the database.voiddeleteInternshipOpportunities(InternshipOpportunity opportunity) Deletes aInternshipOpportunityfrom the database.voiddeleteStudent(Student student) Deletes aStudentfrom the database.Gets all theCareerCenterStaffs in the database.Gets all theCompanyRepresentatives in the database.Gets all theInternshipApplications in the database.Gets all theInternshipOpportunitys in the database.Gets all theStudents in the database.
-
Field Details
-
students
-
representatives
-
staffs
-
internshipOpportunities
-
internshipApplications
-
-
Constructor Details
-
Database
public Database()Constructs aDatabaseinstance.
-
-
Method Details
-
createStudent
Creates aStudentin the database- Parameters:
student- theStudentto be created
-
createCompanyRepresentative
Creates aCompanyRepresentativein the database- Parameters:
rep- theCompanyRepresentativeto be created
-
createCareerCenterStaff
Creates aCareerCenterStaffin the database- Parameters:
staff- theCareerCenterStaffto be created
-
createInternshipOpportunity
Creates aInternshipOpportunityin the database- Parameters:
opportunity- theInternshipOpportunityto be created
-
createInternshipApplication
Creates aInternshipApplicationin the database- Parameters:
application- theInternshipApplicationto be created
-
getStudents
Gets all theStudents in the database.- Returns:
- The
Students in the database.
-
getCompanyRepresentatives
Gets all theCompanyRepresentatives in the database.- Returns:
- The
CompanyRepresentatives in the database.
-
getCareerCenterStaffs
Gets all theCareerCenterStaffs in the database.- Returns:
- The
CareerCenterStaffs in the database.
-
getInternshipOpportunities
Gets all theInternshipOpportunitys in the database.- Returns:
- The
InternshipOpportunitys in the database.
-
getInternshipApplications
Gets all theInternshipApplications in the database.- Returns:
- The
InternshipApplications in the database.
-
deleteStudent
Deletes aStudentfrom the database.- Parameters:
student- TheStudentto delete.
-
deleteCompanyRepresentative
Deletes aCompanyRepresentativefrom the database.- Parameters:
rep- TheCompanyRepresentativeto delete.
-
deleteCareerCenterStaff
Deletes aCareerCenterStafffrom the database.- Parameters:
staff- TheCareerCenterStaffto delete.
-
deleteInternshipOpportunities
Deletes aInternshipOpportunityfrom the database.- Parameters:
opportunity- TheInternshipOpportunityto delete.
-
deleteInternshipApplication
Deletes aInternshipApplicationfrom the database.- Parameters:
application- TheInternshipApplicationto delete.
-