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