package model; import java.util.ArrayList; import java.util.List; import java.util.Objects; public class Student { private Long id; private String name; private String surname; private String location; private int studentindex; private Long facultyid; public Student(Long id, String name, String surname, String location, int studentindex, Long facultyid) { this.id = id; this.name = name; this.surname = surname; this.location = location; this.studentindex = studentindex; this.facultyid = facultyid; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getSurname() { return surname; } public void setSurname(String surname) { this.surname = surname; } public String getLocation() { return location; } public void setLocation(String location) { this.location = location; } public int getStudentindex() { return studentindex; } public void setStudentindex(int studentindex) { this.studentindex = studentindex; } public Long getFacultyid() { return facultyid; } public void setFacultyid(Long facultyid) { this.facultyid = facultyid; } @Override public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) return false; Student student = (Student) o; 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); } @Override public int hashCode() { return Objects.hash(id, name, surname, location, studentindex, facultyid); } }