| [1eb7a55] | 1 | package model;
|
|---|
| 2 |
|
|---|
| 3 | import java.util.Objects;
|
|---|
| 4 |
|
|---|
| 5 | public class Faculty {
|
|---|
| 6 |
|
|---|
| 7 | private Long id;
|
|---|
| 8 |
|
|---|
| 9 | private String name;
|
|---|
| 10 |
|
|---|
| 11 | private String location;
|
|---|
| 12 |
|
|---|
| 13 | private String study_field;
|
|---|
| 14 |
|
|---|
| 15 | private Long universityId;
|
|---|
| 16 |
|
|---|
| 17 | public Faculty(Long id, String name, String location, String study_field, Long universityId) {
|
|---|
| 18 | this.id = id;
|
|---|
| 19 | this.name = name;
|
|---|
| 20 | this.location = location;
|
|---|
| 21 | this.study_field = study_field;
|
|---|
| 22 | this.universityId = universityId;
|
|---|
| 23 | }
|
|---|
| 24 | public Faculty() {}
|
|---|
| 25 |
|
|---|
| 26 | public Long getId() {
|
|---|
| 27 | return id;
|
|---|
| 28 | }
|
|---|
| 29 |
|
|---|
| 30 | public void setId(Long id) {
|
|---|
| 31 | this.id = id;
|
|---|
| 32 | }
|
|---|
| 33 |
|
|---|
| 34 | public String getName() {
|
|---|
| 35 | return name;
|
|---|
| 36 | }
|
|---|
| 37 |
|
|---|
| 38 | public void setName(String name) {
|
|---|
| 39 | this.name = name;
|
|---|
| 40 | }
|
|---|
| 41 |
|
|---|
| 42 | public String getLocation() {
|
|---|
| 43 | return location;
|
|---|
| 44 | }
|
|---|
| 45 |
|
|---|
| 46 | public void setLocation(String location) {
|
|---|
| 47 | this.location = location;
|
|---|
| 48 | }
|
|---|
| 49 |
|
|---|
| 50 | public String getStudy_field() {
|
|---|
| 51 | return study_field;
|
|---|
| 52 | }
|
|---|
| 53 |
|
|---|
| 54 | public void setStudy_field(String study_field) {
|
|---|
| 55 | this.study_field = study_field;
|
|---|
| 56 | }
|
|---|
| 57 |
|
|---|
| 58 | public Long getUniversityId() {
|
|---|
| 59 | return universityId;
|
|---|
| 60 | }
|
|---|
| 61 | public void setUniversityId(Long universityId) {
|
|---|
| 62 | this.universityId = universityId;
|
|---|
| 63 | }
|
|---|
| 64 |
|
|---|
| 65 | @Override
|
|---|
| 66 | public boolean equals(Object o) {
|
|---|
| 67 | if (this == o) return true;
|
|---|
| 68 | if (o == null || getClass() != o.getClass()) return false;
|
|---|
| 69 | Faculty faculty = (Faculty) o;
|
|---|
| 70 | return Objects.equals(id, faculty.id) && Objects.equals(name, faculty.name) && Objects.equals(location, faculty.location) && Objects.equals(study_field, faculty.study_field) && Objects.equals(universityId, faculty.universityId);
|
|---|
| 71 | }
|
|---|
| 72 |
|
|---|
| 73 | @Override
|
|---|
| 74 | public int hashCode() {
|
|---|
| 75 | return Objects.hash(id, name, location, study_field, universityId);
|
|---|
| 76 | }
|
|---|
| 77 |
|
|---|
| 78 | @Override
|
|---|
| 79 | public String toString() {
|
|---|
| 80 | return id + ", " + name + ", " + location + ", " + study_field + ", University ID: " + universityId;
|
|---|
| 81 | }
|
|---|
| 82 | }
|
|---|