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 Status extends AddressableNamedEntity implements IdentifiableEntity<Long> {
30 private final Long id;
31 private final String description;
32 private final URI iconUrl;
33
34 public Status(URI self, final Long id, final String name, final String description, final URI iconUrl) {
35 super(self, name);
36 this.id = id;
37 this.description = description;
38 this.iconUrl = iconUrl;
39 }
40
41 @Override
42 public String toString() {
43 return getToStringHelper().
44 add("id", id).
45 add("description", description).
46 add("iconUrl", iconUrl).
47 toString();
48 }
49
50 @Override
51 public boolean equals(Object obj) {
52 if (obj instanceof Status) {
53 Status that = (Status) obj;
54 return super.equals(obj)
55 && Objects.equal(this.id, that.id)
56 && Objects.equal(this.description, that.description)
57 && Objects.equal(this.iconUrl, that.iconUrl);
58 }
59 return false;
60 }
61
62 @Override
63 public int hashCode() {
64 return Objects.hashCode(super.hashCode(), id, description, iconUrl);
65 }
66
67 @Override
68 public Long getId() {
69 return id;
70 }
71
72 public String getDescription() {
73 return description;
74 }
75
76 public URI getIconUrl() {
77 return iconUrl;
78 }
79 }