1
2
3
4
5
6
7
8
9 package data.worldbank.org.countries;
10
11 import java.io.Serializable;
12 import javax.persistence.Basic;
13 import javax.persistence.Column;
14 import javax.persistence.Entity;
15 import javax.persistence.GeneratedValue;
16 import javax.persistence.GenerationType;
17 import javax.persistence.Id;
18 import javax.persistence.Inheritance;
19 import javax.persistence.InheritanceType;
20 import javax.persistence.Table;
21 import javax.xml.bind.annotation.XmlAccessType;
22 import javax.xml.bind.annotation.XmlAccessorType;
23 import javax.xml.bind.annotation.XmlAttribute;
24 import javax.xml.bind.annotation.XmlRootElement;
25 import javax.xml.bind.annotation.XmlSchemaType;
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}anySimpleType" />
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 = "incomeLevel")
58 @Entity(name = "data.worldbank.org.countries.IncomeLevel")
59 @Table(name = "INCOMELEVEL")
60 @Inheritance(strategy = InheritanceType.JOINED)
61 public class IncomeLevel
62 implements Serializable, Equals, HashCode
63 {
64
65 @XmlValue
66 protected String content;
67 @XmlAttribute(required = true)
68 @XmlSchemaType(name = "anySimpleType")
69 protected String id;
70 @XmlAttribute(name = "Hjid")
71 protected Long hjid;
72
73 /***
74 * Gets the value of the content property.
75 *
76 * @return
77 * possible object is
78 * {@link String }
79 *
80 */
81 @Basic
82 @Column(name = "CONTENT")
83 public String getContent() {
84 return content;
85 }
86
87 /***
88 * Sets the value of the content property.
89 *
90 * @param value
91 * allowed object is
92 * {@link String }
93 *
94 */
95 public void setContent(String value) {
96 this.content = value;
97 }
98
99 /***
100 * Gets the value of the id property.
101 *
102 * @return
103 * possible object is
104 * {@link String }
105 *
106 */
107 @Basic
108 @Column(name = "ID")
109 public String getId() {
110 return id;
111 }
112
113 /***
114 * Sets the value of the id property.
115 *
116 * @param value
117 * allowed object is
118 * {@link String }
119 *
120 */
121 public void setId(String value) {
122 this.id = value;
123 }
124
125 /***
126 * Gets the value of the hjid property.
127 *
128 * @return
129 * possible object is
130 * {@link Long }
131 *
132 */
133 @Id
134 @Column(name = "HJID")
135 @GeneratedValue(strategy = GenerationType.AUTO)
136 public Long getHjid() {
137 return hjid;
138 }
139
140 /***
141 * Sets the value of the hjid property.
142 *
143 * @param value
144 * allowed object is
145 * {@link Long }
146 *
147 */
148 public void setHjid(Long value) {
149 this.hjid = value;
150 }
151
152 public void equals(Object object, EqualsBuilder equalsBuilder) {
153 if (!(object instanceof IncomeLevel)) {
154 equalsBuilder.appendSuper(false);
155 return ;
156 }
157 if (this == object) {
158 return ;
159 }
160 final IncomeLevel that = ((IncomeLevel) object);
161 equalsBuilder.append(this.getContent(), that.getContent());
162 equalsBuilder.append(this.getId(), that.getId());
163 }
164
165 public boolean equals(Object object) {
166 if (!(object instanceof IncomeLevel)) {
167 return false;
168 }
169 if (this == object) {
170 return true;
171 }
172 final EqualsBuilder equalsBuilder = new JAXBEqualsBuilder();
173 equals(object, equalsBuilder);
174 return equalsBuilder.isEquals();
175 }
176
177 public void hashCode(HashCodeBuilder hashCodeBuilder) {
178 hashCodeBuilder.append(this.getContent());
179 hashCodeBuilder.append(this.getId());
180 }
181
182 public int hashCode() {
183 final HashCodeBuilder hashCodeBuilder = new JAXBHashCodeBuilder();
184 hashCode(hashCodeBuilder);
185 return hashCodeBuilder.toHashCode();
186 }
187
188 }