1
2
3
4
5
6
7
8
9 package data.worldbank.org.indicators;
10
11 import java.io.Serializable;
12 import java.math.BigInteger;
13 import javax.persistence.Basic;
14 import javax.persistence.Column;
15 import javax.persistence.Entity;
16 import javax.persistence.GeneratedValue;
17 import javax.persistence.GenerationType;
18 import javax.persistence.Id;
19 import javax.persistence.Inheritance;
20 import javax.persistence.InheritanceType;
21 import javax.persistence.Table;
22 import javax.xml.bind.annotation.XmlAccessType;
23 import javax.xml.bind.annotation.XmlAccessorType;
24 import javax.xml.bind.annotation.XmlAttribute;
25 import javax.xml.bind.annotation.XmlRootElement;
26 import javax.xml.bind.annotation.XmlType;
27 import javax.xml.bind.annotation.XmlValue;
28 import org.apache.commons.lang.builder.EqualsBuilder;
29 import org.apache.commons.lang.builder.HashCodeBuilder;
30 import org.jvnet.jaxb2_commons.lang.Equals;
31 import org.jvnet.jaxb2_commons.lang.HashCode;
32 import org.jvnet.jaxb2_commons.lang.builder.JAXBEqualsBuilder;
33 import org.jvnet.jaxb2_commons.lang.builder.JAXBHashCodeBuilder;
34
35
36 /***
37 * <p>Java class for anonymous complex type.
38 *
39 * <p>The following schema fragment specifies the expected content contained within this class.
40 *
41 * <pre>
42 * <complexType>
43 * <complexContent>
44 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
45 * <attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}integer" />
46 * </restriction>
47 * </complexContent>
48 * </complexType>
49 * </pre>
50 *
51 *
52 */
53 @XmlAccessorType(XmlAccessType.FIELD)
54 @XmlType(name = "", propOrder = {
55 "content"
56 })
57 @XmlRootElement(name = "topic")
58 @Entity(name = "data.worldbank.org.indicators.Topic")
59 @Table(name = "TOPIC")
60 @Inheritance(strategy = InheritanceType.JOINED)
61 public class Topic
62 implements Serializable, Equals, HashCode
63 {
64
65 @XmlValue
66 protected String content;
67 @XmlAttribute(required = true)
68 protected BigInteger id;
69 @XmlAttribute(name = "Hjid")
70 protected Long hjid;
71
72 /***
73 * Gets the value of the content property.
74 *
75 * @return
76 * possible object is
77 * {@link String }
78 *
79 */
80 @Basic
81 @Column(name = "CONTENT")
82 public String getContent() {
83 return content;
84 }
85
86 /***
87 * Sets the value of the content property.
88 *
89 * @param value
90 * allowed object is
91 * {@link String }
92 *
93 */
94 public void setContent(String value) {
95 this.content = value;
96 }
97
98 /***
99 * Gets the value of the id property.
100 *
101 * @return
102 * possible object is
103 * {@link BigInteger }
104 *
105 */
106 @Basic
107 @Column(name = "ID", precision = 20, scale = 10)
108 public BigInteger getId() {
109 return id;
110 }
111
112 /***
113 * Sets the value of the id property.
114 *
115 * @param value
116 * allowed object is
117 * {@link BigInteger }
118 *
119 */
120 public void setId(BigInteger value) {
121 this.id = value;
122 }
123
124 /***
125 * Gets the value of the hjid property.
126 *
127 * @return
128 * possible object is
129 * {@link Long }
130 *
131 */
132 @Id
133 @Column(name = "HJID")
134 @GeneratedValue(strategy = GenerationType.AUTO)
135 public Long getHjid() {
136 return hjid;
137 }
138
139 /***
140 * Sets the value of the hjid property.
141 *
142 * @param value
143 * allowed object is
144 * {@link Long }
145 *
146 */
147 public void setHjid(Long value) {
148 this.hjid = value;
149 }
150
151 public void equals(Object object, EqualsBuilder equalsBuilder) {
152 if (!(object instanceof Topic)) {
153 equalsBuilder.appendSuper(false);
154 return ;
155 }
156 if (this == object) {
157 return ;
158 }
159 final Topic that = ((Topic) object);
160 equalsBuilder.append(this.getContent(), that.getContent());
161 equalsBuilder.append(this.getId(), that.getId());
162 }
163
164 public boolean equals(Object object) {
165 if (!(object instanceof Topic)) {
166 return false;
167 }
168 if (this == object) {
169 return true;
170 }
171 final EqualsBuilder equalsBuilder = new JAXBEqualsBuilder();
172 equals(object, equalsBuilder);
173 return equalsBuilder.isEquals();
174 }
175
176 public void hashCode(HashCodeBuilder hashCodeBuilder) {
177 hashCodeBuilder.append(this.getContent());
178 hashCodeBuilder.append(this.getId());
179 }
180
181 public int hashCode() {
182 final HashCodeBuilder hashCodeBuilder = new JAXBHashCodeBuilder();
183 hashCode(hashCodeBuilder);
184 return hashCodeBuilder.toHashCode();
185 }
186
187 }