source: src/main/java/model/University.java@ 1eb7a55

Last change on this file since 1eb7a55 was 1eb7a55, checked in by Elena Markovska <elena.elenamarkovska@…>, 11 days ago

Initial commit - Scholaris project code

  • Property mode set to 100644
File size: 1.5 KB
RevLine 
[1eb7a55]1package model;
2
3import java.util.Objects;
4
5public 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}
Note: See TracBrowser for help on using the repository browser.