1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package com.atlassian.jira.rest.client.api.domain;
18
19 import com.atlassian.jira.rest.client.api.IdentifiableEntity;
20 import com.google.common.base.Objects;
21
22 import java.net.URI;
23
24
25
26
27
28
29 public class Resolution extends AddressableNamedEntity implements IdentifiableEntity<Long> {
30 private final Long id;
31 private final String description;
32
33 public Resolution(final URI self, final Long id, final String name, final String description) {
34 super(self, name);
35 this.id = id;
36 this.description = description;
37 }
38
39 public Long getId() {
40 return id;
41 }
42
43 public String getDescription() {
44 return description;
45 }
46
47 @Override
48 public String toString() {
49 return getToStringHelper().
50 add("id", id).
51 add("description", description).
52 toString();
53 }
54
55 @Override
56 public boolean equals(Object obj) {
57 if (obj instanceof Resolution) {
58 Resolution that = (Resolution) obj;
59 return super.equals(obj)
60 && Objects.equal(this.id, that.id)
61 && Objects.equal(this.description, that.description);
62 }
63 return false;
64 }
65
66 @Override
67 public int hashCode() {
68 return Objects.hashCode(super.hashCode(), id, description);
69 }
70 }