Package src.model.user
Class Student
java.lang.Object
src.model.User
src.model.user.Student
Student class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate LocalDateprivate LocalDateprivate InternshipOpportunityprivate ArrayList<InternshipApplication> private ArrayList<InternshipLevel> private Stringstatic final intThe maximum number of internship opportunities aStudentcan apply for at once.private int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCompanyNameFilter(String companyName) AddscompanyNametoStudent'scompanyNameFilterintaddInternshipApplication(InternshipApplication internshipApplication) AddsinternshipApplicationtoStudent'sinternshipApplicationsvoidaddInternshipLevelFilter(InternshipLevel internshipLevel) AddsinternshipLeveltoStudent'sinternshipLevelFilterintdeleteInternshipApplication(InternshipApplication internshipApplication) DeletesinternshipApplicationfromStudent'sinternshipApplicationsGetter forapplicationClosingDateFilterGetter forapplicationOpeningDateFilterGetter for companyNameFilterGetter forinternshipGetter forinternshipApplicationsGetter forinternshipLevelFiltergetMajor()Getter formajorintGetter foryearOfStudyremoveCompanyNameFilter(int i) RemovescompanyNamefromStudent'scompanyNameFiltervoidremoveCompanyNameFilter(String companyName) RemovescompanyNamefromStudent'scompanyNameFilterremoveInternshipLevelFilter(int i) RemovesinternshipLevelfromStudent'sinternshipLevelFilter.voidremoveInternshipLevelFilter(InternshipLevel internshipLevel) RemovesinternshipLevelfromStudent'sinternshipLevelFiltervoidsetApplicationClosingDateFilter(LocalDate applicationClosingDateFilter) Getter forapplicationClosingDateFiltervoidsetApplicationOpeningDateFilter(LocalDate applicationOpeningDateFilter) Setter forapplicationOpeningDateFiltervoidsetInternship(InternshipOpportunity internship) Setter forinternshipvoidSetter formajorvoidsetYearOfStudy(int yearOfStudy) Setter foryearOfStudyMethods inherited from class src.model.User
getName, getPasswordHash, getUserID, setName, setPasswordHash, setUserID
-
Field Details
-
MAX_APPLICATIONS
public static final int MAX_APPLICATIONSThe maximum number of internship opportunities aStudentcan apply for at once.- See Also:
-
yearOfStudy
private int yearOfStudy -
major
-
internship
-
internshipApplications
-
internshipLevelFilter
-
companyNameFilter
-
applicationOpeningDateFilter
-
applicationClosingDateFilter
-
-
Constructor Details
-
Student
public Student(String userID, String name, String passwordHash, int yearOfStudy, String major, InternshipOpportunity internship) Constructs a Student constructor with required attributes- Parameters:
userID- the matriculation number of the Studentname- thenameof theStudentpasswordHash- thepasswordHashof theStudentyearOfStudy- theyearOfStudyof theStudentmajor- themajorof theStudentinternship- theinternshipof theStudent
-
-
Method Details
-
getYearOfStudy
public int getYearOfStudy()Getter foryearOfStudy- Returns:
- yearOfStudy
-
setYearOfStudy
public void setYearOfStudy(int yearOfStudy) Setter foryearOfStudy- Parameters:
yearOfStudy- theyearOfStudyto set
-
getMajor
Getter formajor- Returns:
- major
-
setMajor
Setter formajor- Parameters:
major- themajorto set
-
getInternship
Getter forinternship- Returns:
- internship
-
setInternship
Setter forinternship- Parameters:
internship- theinternshipto set
-
getInternshipApplications
Getter forinternshipApplications- Returns:
- internshipApplications
-
addInternshipApplication
AddsinternshipApplicationtoStudent'sinternshipApplications- Parameters:
internshipApplication- theinternshipApplicationto delete- Returns:
- 0 if success, 1 if error
-
deleteInternshipApplication
DeletesinternshipApplicationfromStudent'sinternshipApplications- Parameters:
internshipApplication- theinternshipApplicationto delete- Returns:
- 0 if success, 1 if error
-
getInternshipLevelFilter
Getter forinternshipLevelFilter- Returns:
- internshipLevelFilter
-
addInternshipLevelFilter
AddsinternshipLeveltoStudent'sinternshipLevelFilter- Parameters:
internshipLevel- theinternshipLevelto add
-
removeInternshipLevelFilter
RemovesinternshipLevelfromStudent'sinternshipLevelFilter- Parameters:
internshipLevel- theinternshipLevelto remove
-
removeInternshipLevelFilter
RemovesinternshipLevelfromStudent'sinternshipLevelFilter.- Parameters:
i- the index of theinternshipLevelto remove.- Returns:
- The
InternshipLevelthat was from removed from the list, ornullif the filter was cleared.
-
getCompanyNameFilter
Getter for companyNameFilter- Returns:
- companyNameFilter
-
addCompanyNameFilter
AddscompanyNametoStudent'scompanyNameFilter- Parameters:
companyName- thecompanyNameto add
-
removeCompanyNameFilter
RemovescompanyNamefromStudent'scompanyNameFilter- Parameters:
companyName- thecompanyNameto remove
-
removeCompanyNameFilter
RemovescompanyNamefromStudent'scompanyNameFilter- Parameters:
i- the index of thecompanyNameto remove- Returns:
- The
companyNamethat was removed from the list, ornullif the list was cleared.
-
getApplicationOpeningDateFilter
Getter forapplicationOpeningDateFilter- Returns:
- applicationOpeningDateFilter
-
setApplicationOpeningDateFilter
Setter forapplicationOpeningDateFilter- Parameters:
applicationOpeningDateFilter- theapplicationOpeningDateFitlterto set
-
getApplicationClosingDateFilter
Getter forapplicationClosingDateFilter- Returns:
- applicationClosingDate
-
setApplicationClosingDateFilter
Getter forapplicationClosingDateFilter- Parameters:
applicationClosingDateFilter- theapplicationClosingDateFitlterto set
-