|
1 /* |
|
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
|
3 * |
|
4 * Copyright 2018 Mike Becker. All rights reserved. |
|
5 * |
|
6 * Redistribution and use in source and binary forms, with or without |
|
7 * modification, are permitted provided that the following conditions are met: |
|
8 * |
|
9 * 1. Redistributions of source code must retain the above copyright |
|
10 * notice, this list of conditions and the following disclaimer. |
|
11 * |
|
12 * 2. Redistributions in binary form must reproduce the above copyright |
|
13 * notice, this list of conditions and the following disclaimer in the |
|
14 * documentation and/or other materials provided with the distribution. |
|
15 * |
|
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
|
17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
|
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
|
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE |
|
20 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
|
21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
|
22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
|
23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
|
24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
|
25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
|
26 * POSSIBILITY OF SUCH DAMAGE. |
|
27 * |
|
28 */ |
|
29 package de.uapcore.lightpit.entities; |
|
30 |
|
31 import java.sql.Date; |
|
32 import java.sql.Timestamp; |
|
33 import java.util.List; |
|
34 import java.util.Objects; |
|
35 |
|
36 public final class Issue { |
|
37 |
|
38 private final int id; |
|
39 private final Project project; |
|
40 |
|
41 private IssueStatus status; |
|
42 private IssueCategory category; |
|
43 |
|
44 private String subject; |
|
45 private String description; |
|
46 |
|
47 private List<Version> affectedVersions; |
|
48 private Version scheduledVersion; |
|
49 private Version resolvedVersion; |
|
50 |
|
51 private Timestamp created; |
|
52 private Timestamp updated; |
|
53 private Date eta; |
|
54 |
|
55 public Issue(int id, Project project) { |
|
56 this.id = id; |
|
57 this.project = project; |
|
58 } |
|
59 |
|
60 public int getId() { |
|
61 return id; |
|
62 } |
|
63 |
|
64 public Project getProject() { |
|
65 return project; |
|
66 } |
|
67 |
|
68 public IssueStatus getStatus() { |
|
69 return status; |
|
70 } |
|
71 |
|
72 public void setStatus(IssueStatus status) { |
|
73 this.status = status; |
|
74 } |
|
75 |
|
76 public IssueCategory getCategory() { |
|
77 return category; |
|
78 } |
|
79 |
|
80 public void setCategory(IssueCategory category) { |
|
81 this.category = category; |
|
82 } |
|
83 |
|
84 public String getSubject() { |
|
85 return subject; |
|
86 } |
|
87 |
|
88 public void setSubject(String subject) { |
|
89 this.subject = subject; |
|
90 } |
|
91 |
|
92 public String getDescription() { |
|
93 return description; |
|
94 } |
|
95 |
|
96 public void setDescription(String description) { |
|
97 this.description = description; |
|
98 } |
|
99 |
|
100 public List<Version> getAffectedVersions() { |
|
101 return affectedVersions; |
|
102 } |
|
103 |
|
104 public void setAffectedVersions(List<Version> affectedVersions) { |
|
105 this.affectedVersions = affectedVersions; |
|
106 } |
|
107 |
|
108 public Version getScheduledVersion() { |
|
109 return scheduledVersion; |
|
110 } |
|
111 |
|
112 public void setScheduledVersion(Version scheduledVersion) { |
|
113 this.scheduledVersion = scheduledVersion; |
|
114 } |
|
115 |
|
116 public Version getResolvedVersion() { |
|
117 return resolvedVersion; |
|
118 } |
|
119 |
|
120 public void setResolvedVersion(Version resolvedVersion) { |
|
121 this.resolvedVersion = resolvedVersion; |
|
122 } |
|
123 |
|
124 public Timestamp getCreated() { |
|
125 return created; |
|
126 } |
|
127 |
|
128 public void setCreated(Timestamp created) { |
|
129 this.created = created; |
|
130 } |
|
131 |
|
132 public Timestamp getUpdated() { |
|
133 return updated; |
|
134 } |
|
135 |
|
136 public void setUpdated(Timestamp updated) { |
|
137 this.updated = updated; |
|
138 } |
|
139 |
|
140 public Date getEta() { |
|
141 return eta; |
|
142 } |
|
143 |
|
144 public void setEta(Date eta) { |
|
145 this.eta = eta; |
|
146 } |
|
147 |
|
148 @Override |
|
149 public boolean equals(Object o) { |
|
150 if (this == o) return true; |
|
151 if (o == null || getClass() != o.getClass()) return false; |
|
152 Issue issue = (Issue) o; |
|
153 return id == issue.id; |
|
154 } |
|
155 |
|
156 @Override |
|
157 public int hashCode() { |
|
158 return Objects.hash(id); |
|
159 } |
|
160 } |