| [1eb7a55] | 1 | package model;
|
|---|
| 2 |
|
|---|
| 3 | import java.util.ArrayList;
|
|---|
| 4 | import java.util.List;
|
|---|
| 5 | import java.util.Objects;
|
|---|
| 6 |
|
|---|
| 7 | public class Professor {
|
|---|
| 8 |
|
|---|
| 9 | private Long id;
|
|---|
| 10 |
|
|---|
| 11 | private String name;
|
|---|
| 12 |
|
|---|
| 13 | private String surname;
|
|---|
| 14 |
|
|---|
| 15 | private int age;
|
|---|
| 16 |
|
|---|
| 17 | private Long facultyid;
|
|---|
| 18 |
|
|---|
| 19 | private University university;
|
|---|
| 20 |
|
|---|
| 21 | public Professor(Long id, String name, String surname, int age, Long facultyid, University university) {
|
|---|
| 22 | this.id = id;
|
|---|
| 23 | this.name = name;
|
|---|
| 24 | this.surname = surname;
|
|---|
| 25 | this.age = age;
|
|---|
| 26 | this.facultyid = facultyid;
|
|---|
| 27 | this.university = university;
|
|---|
| 28 | }
|
|---|
| 29 |
|
|---|
| 30 | public Long getId() {
|
|---|
| 31 | return id;
|
|---|
| 32 | }
|
|---|
| 33 |
|
|---|
| 34 | public void setId(Long id) {
|
|---|
| 35 | this.id = id;
|
|---|
| 36 | }
|
|---|
| 37 |
|
|---|
| 38 | public String getName() {
|
|---|
| 39 | return name;
|
|---|
| 40 | }
|
|---|
| 41 |
|
|---|
| 42 | public void setName(String name) {
|
|---|
| 43 | this.name = name;
|
|---|
| 44 | }
|
|---|
| 45 |
|
|---|
| 46 | public String getSurname() {
|
|---|
| 47 | return surname;
|
|---|
| 48 | }
|
|---|
| 49 |
|
|---|
| 50 | public void setSurname(String surname) {
|
|---|
| 51 | this.surname = surname;
|
|---|
| 52 | }
|
|---|
| 53 |
|
|---|
| 54 | public int getAge() {
|
|---|
| 55 | return age;
|
|---|
| 56 | }
|
|---|
| 57 |
|
|---|
| 58 | public void setAge(int age) {
|
|---|
| 59 | this.age = age;
|
|---|
| 60 | }
|
|---|
| 61 |
|
|---|
| 62 | public Long getFacultyid() {
|
|---|
| 63 | return facultyid;
|
|---|
| 64 | }
|
|---|
| 65 |
|
|---|
| 66 | public void setFacultyid(Long facultyid) {
|
|---|
| 67 | this.facultyid = facultyid;
|
|---|
| 68 | }
|
|---|
| 69 |
|
|---|
| 70 | public University getUniversity() {
|
|---|
| 71 | return university;
|
|---|
| 72 | }
|
|---|
| 73 |
|
|---|
| 74 | public void setUniversity(University university) {
|
|---|
| 75 | this.university = university;
|
|---|
| 76 | }
|
|---|
| 77 |
|
|---|
| 78 | @Override
|
|---|
| 79 | public boolean equals(Object o) {
|
|---|
| 80 | if (o == null || getClass() != o.getClass()) return false;
|
|---|
| 81 | Professor professor = (Professor) o;
|
|---|
| 82 | return age == professor.age && Objects.equals(id, professor.id) && Objects.equals(name, professor.name) && Objects.equals(surname, professor.surname) && Objects.equals(facultyid, professor.facultyid);
|
|---|
| 83 | }
|
|---|
| 84 |
|
|---|
| 85 | @Override
|
|---|
| 86 | public int hashCode() {
|
|---|
| 87 | return Objects.hash(id, name, surname, age, facultyid);
|
|---|
| 88 | }
|
|---|
| 89 | } |
|---|