source: src/main/java/model/Advice.java@ 1eb7a55

Last change on this file since 1eb7a55 was 1eb7a55, checked in by Elena Markovska <elena.elenamarkovska@…>, 11 days ago

Initial commit - Scholaris project code

  • Property mode set to 100644
File size: 1.5 KB
RevLine 
[1eb7a55]1package model;
2
3import java.sql.Date;
4import java.util.Objects;
5
6public class Advice {
7 private int student_id;
8 private int professor_id;
9 private Date start_date;
10 private Date end_date;
11
12 public Advice() {}
13
14 public Advice(int student_id, int professor_id, Date start_date, Date end_date) {
15 this.student_id = student_id;
16 this.professor_id = professor_id;
17 this.start_date = start_date;
18 this.end_date = end_date;
19 }
20
21 public int getstudent_id() {
22 return student_id;
23 }
24 public void setstudent_id(int student_id) {
25 this.student_id = student_id;
26 }
27
28 public int getprofessor_id() {
29 return professor_id;
30 }
31 public void setprofessor_id(int professor_id) {
32 this.professor_id = professor_id;
33 }
34
35 public Date getstart_date() {
36 return start_date;
37 }
38 public void setstart_date(Date start_date) {
39 this.start_date = start_date;
40 }
41
42 public Date getend_date() {
43 return end_date;
44 }
45 public void setend_date(Date end_date) {
46 this.end_date = end_date;
47 }
48
49 @Override
50 public boolean equals(Object o) {
51 if (o == null || getClass() != o.getClass()) return false;
52 Advice advice = (Advice) o;
53 return student_id == advice.student_id && professor_id == advice.professor_id && Objects.equals(start_date, advice.start_date) && Objects.equals(end_date, advice.end_date);
54 }
55
56 @Override
57 public int hashCode() {
58 return Objects.hash(student_id, professor_id, start_date, end_date);
59 }
60}
Note: See TracBrowser for help on using the repository browser.