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