1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.fosstrak.epcis.repository.model;
22
23 import static org.fosstrak.epcis.repository.Utils.eq;
24
25 import java.io.Serializable;
26
27
28
29
30
31
32 public class VocabularyAttrCiD implements Serializable {
33
34
35
36
37 private static final long serialVersionUID = -5025973585282842235L;
38
39 private String privateID;
40 private Long id;
41 private String attribute;
42
43 public VocabularyAttrCiD() {
44 this.privateID = java.util.UUID.randomUUID().toString();
45 }
46
47 public int hashCode() {
48 return privateID.hashCode();
49 }
50
51 public Long getId() {
52 return id;
53 }
54
55 public void setId(Long id) {
56 this.id = id;
57 }
58
59 public String getAttribute() {
60 return attribute;
61 }
62
63 public void setAttribute(String attribute) {
64 this.attribute = attribute;
65 }
66
67 @Override
68 public boolean equals(Object o) {
69 if (o instanceof VocabularyAttrCiD) {
70 VocabularyAttrCiD that = (VocabularyAttrCiD) o;
71 return eq(this.id, that.id) && eq(this.attribute, that.attribute);
72 }
73 else {
74 return false;
75 }
76
77 }
78
79 }