|
1 package de.uapcore.lightpit.entities; |
|
2 |
|
3 import java.util.ArrayList; |
|
4 import java.util.List; |
|
5 import java.util.Objects; |
|
6 |
|
7 public class Project { |
|
8 |
|
9 private final int id; |
|
10 private String name; |
|
11 private String description; |
|
12 private String repoUrl; |
|
13 private User owner; |
|
14 |
|
15 private final List<Version> versions = new ArrayList<>(); |
|
16 |
|
17 public Project(int id) { |
|
18 this.id = id; |
|
19 } |
|
20 |
|
21 public int getId() { |
|
22 return id; |
|
23 } |
|
24 |
|
25 public String getName() { |
|
26 return name; |
|
27 } |
|
28 |
|
29 public void setName(String name) { |
|
30 this.name = name; |
|
31 } |
|
32 |
|
33 public String getDescription() { |
|
34 return description; |
|
35 } |
|
36 |
|
37 public void setDescription(String description) { |
|
38 this.description = description; |
|
39 } |
|
40 |
|
41 public String getRepoUrl() { |
|
42 return repoUrl; |
|
43 } |
|
44 |
|
45 public void setRepoUrl(String repoUrl) { |
|
46 this.repoUrl = repoUrl; |
|
47 } |
|
48 |
|
49 public User getOwner() { |
|
50 return owner; |
|
51 } |
|
52 |
|
53 public void setOwner(User owner) { |
|
54 this.owner = owner; |
|
55 } |
|
56 |
|
57 public List<Version> getVersions() { |
|
58 return versions; |
|
59 } |
|
60 |
|
61 @Override |
|
62 public boolean equals(Object o) { |
|
63 if (this == o) return true; |
|
64 if (o == null || getClass() != o.getClass()) return false; |
|
65 Project project = (Project) o; |
|
66 return id == project.id; |
|
67 } |
|
68 |
|
69 @Override |
|
70 public int hashCode() { |
|
71 return Objects.hash(id); |
|
72 } |
|
73 } |