| [1eb7a55] | 1 | package model;
|
|---|
| 2 |
|
|---|
| 3 | import java.time.LocalDate;
|
|---|
| 4 | import java.util.Objects;
|
|---|
| 5 |
|
|---|
| 6 | public class StudentSubject {
|
|---|
| 7 | private Long ss_id;
|
|---|
| 8 | private Long student_id;
|
|---|
| 9 | private Long subject_id;
|
|---|
| 10 | private LocalDate enrollment_date;
|
|---|
| 11 | private String status;
|
|---|
| 12 | private Integer final_grade;
|
|---|
| 13 | private int absences_count;
|
|---|
| 14 |
|
|---|
| 15 | public StudentSubject() {}
|
|---|
| 16 |
|
|---|
| 17 | public StudentSubject(Long ss_id, Long student_id, Long subject_id, LocalDate enrollment_date, String status, Integer final_grade, int absences_count) {
|
|---|
| 18 | this.ss_id = ss_id;
|
|---|
| 19 | this.student_id = student_id;
|
|---|
| 20 | this.subject_id = subject_id;
|
|---|
| 21 | this.enrollment_date = enrollment_date;
|
|---|
| 22 | this.status = status;
|
|---|
| 23 | this.final_grade = final_grade;
|
|---|
| 24 | this.absences_count = absences_count;
|
|---|
| 25 | }
|
|---|
| 26 |
|
|---|
| 27 | public StudentSubject(Long student_id, Long subject_id, LocalDate enrollment_date, int absences_count, String status) {
|
|---|
| 28 | this.student_id = student_id;
|
|---|
| 29 | this.subject_id = subject_id;
|
|---|
| 30 | this.enrollment_date = enrollment_date;
|
|---|
| 31 | this.absences_count = absences_count;
|
|---|
| 32 | this.status = status;
|
|---|
| 33 | }
|
|---|
| 34 |
|
|---|
| 35 | public Long getSs_id() {
|
|---|
| 36 | return ss_id;
|
|---|
| 37 | }
|
|---|
| 38 |
|
|---|
| 39 | public void setSs_id(Long ss_id) {
|
|---|
| 40 | this.ss_id = ss_id;
|
|---|
| 41 | }
|
|---|
| 42 |
|
|---|
| 43 | public Long getStudent_id() {
|
|---|
| 44 | return student_id;
|
|---|
| 45 | }
|
|---|
| 46 |
|
|---|
| 47 | public void setStudent_id(Long student_id) {
|
|---|
| 48 | this.student_id = student_id;
|
|---|
| 49 | }
|
|---|
| 50 |
|
|---|
| 51 | public Long getSubject_id() {
|
|---|
| 52 | return subject_id;
|
|---|
| 53 | }
|
|---|
| 54 |
|
|---|
| 55 | public void setSubject_id(Long subject_id) {
|
|---|
| 56 | this.subject_id = subject_id;
|
|---|
| 57 | }
|
|---|
| 58 |
|
|---|
| 59 | public LocalDate getEnrollment_date() {
|
|---|
| 60 | return enrollment_date;
|
|---|
| 61 | }
|
|---|
| 62 |
|
|---|
| 63 | public void setEnrollment_date(LocalDate enrollment_date) {
|
|---|
| 64 | this.enrollment_date = enrollment_date;
|
|---|
| 65 | }
|
|---|
| 66 |
|
|---|
| 67 | public String getStatus() {
|
|---|
| 68 | return status;
|
|---|
| 69 | }
|
|---|
| 70 |
|
|---|
| 71 | public void setStatus(String status) {
|
|---|
| 72 | this.status = status;
|
|---|
| 73 | }
|
|---|
| 74 |
|
|---|
| 75 | public Integer getFinal_grade() {
|
|---|
| 76 | return final_grade;
|
|---|
| 77 | }
|
|---|
| 78 |
|
|---|
| 79 | public void setFinal_grade(Integer final_grade) {
|
|---|
| 80 | this.final_grade = final_grade;
|
|---|
| 81 | }
|
|---|
| 82 |
|
|---|
| 83 | public int getAbsences_count() {
|
|---|
| 84 | return absences_count;
|
|---|
| 85 | }
|
|---|
| 86 |
|
|---|
| 87 | public void setAbsences_count(int absences_count) {
|
|---|
| 88 | this.absences_count = absences_count;
|
|---|
| 89 | }
|
|---|
| 90 |
|
|---|
| 91 | @Override
|
|---|
| 92 | public boolean equals(Object o) {
|
|---|
| 93 | if (o == null || getClass() != o.getClass()) return false;
|
|---|
| 94 | StudentSubject that = (StudentSubject) o;
|
|---|
| 95 | return absences_count == that.absences_count && Objects.equals(ss_id, that.ss_id) && Objects.equals(student_id, that.student_id) && Objects.equals(subject_id, that.subject_id) && Objects.equals(enrollment_date, that.enrollment_date) && Objects.equals(status, that.status) && Objects.equals(final_grade, that.final_grade);
|
|---|
| 96 | }
|
|---|
| 97 |
|
|---|
| 98 | @Override
|
|---|
| 99 | public int hashCode() {
|
|---|
| 100 | return Objects.hash(ss_id, student_id, subject_id, enrollment_date, status, final_grade, absences_count);
|
|---|
| 101 | }
|
|---|
| 102 | } |
|---|