View Javadoc

1   //
2   // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v3.0-03/04/2009 09:20 AM(valikov)-fcs 
3   // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> 
4   // Any modifications to this file will be lost upon recompilation of the source schema. 
5   // Generated on: 2010.06.07 at 05:27:09 PM CEST 
6   //
7   
8   
9   package data.worldbank.org.indicators;
10  
11  import java.io.Serializable;
12  import java.util.ArrayList;
13  import java.util.List;
14  import javax.persistence.CascadeType;
15  import javax.persistence.Column;
16  import javax.persistence.Entity;
17  import javax.persistence.GeneratedValue;
18  import javax.persistence.GenerationType;
19  import javax.persistence.Id;
20  import javax.persistence.Inheritance;
21  import javax.persistence.InheritanceType;
22  import javax.persistence.JoinColumn;
23  import javax.persistence.OneToMany;
24  import javax.persistence.Table;
25  import javax.xml.bind.annotation.XmlAccessType;
26  import javax.xml.bind.annotation.XmlAccessorType;
27  import javax.xml.bind.annotation.XmlAttribute;
28  import javax.xml.bind.annotation.XmlRootElement;
29  import javax.xml.bind.annotation.XmlType;
30  import org.apache.commons.lang.builder.EqualsBuilder;
31  import org.apache.commons.lang.builder.HashCodeBuilder;
32  import org.jvnet.jaxb2_commons.lang.Equals;
33  import org.jvnet.jaxb2_commons.lang.HashCode;
34  import org.jvnet.jaxb2_commons.lang.builder.JAXBEqualsBuilder;
35  import org.jvnet.jaxb2_commons.lang.builder.JAXBHashCodeBuilder;
36  
37  
38  /***
39   * <p>Java class for anonymous complex type.
40   * 
41   * <p>The following schema fragment specifies the expected content contained within this class.
42   * 
43   * <pre>
44   * &lt;complexType>
45   *   &lt;complexContent>
46   *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
47   *       &lt;sequence>
48   *         &lt;element ref="{http://www.worldbank.org}topic" maxOccurs="unbounded" minOccurs="0"/>
49   *       &lt;/sequence>
50   *     &lt;/restriction>
51   *   &lt;/complexContent>
52   * &lt;/complexType>
53   * </pre>
54   * 
55   * 
56   */
57  @XmlAccessorType(XmlAccessType.FIELD)
58  @XmlType(name = "", propOrder = {
59      "topic"
60  })
61  @XmlRootElement(name = "topics")
62  @Entity(name = "data.worldbank.org.indicators.Topics")
63  @Table(name = "TOPICS")
64  @Inheritance(strategy = InheritanceType.JOINED)
65  public class Topics
66      implements Serializable, Equals, HashCode
67  {
68  
69      protected List<Topic> topic;
70      @XmlAttribute(name = "Hjid")
71      protected Long hjid;
72  
73      /***
74       * Gets the value of the topic property.
75       * 
76       * <p>
77       * This accessor method returns a reference to the live list,
78       * not a snapshot. Therefore any modification you make to the
79       * returned list will be present inside the JAXB object.
80       * This is why there is not a <CODE>set</CODE> method for the topic property.
81       * 
82       * <p>
83       * For example, to add a new item, do as follows:
84       * <pre>
85       *    getTopic().add(newItem);
86       * </pre>
87       * 
88       * 
89       * <p>
90       * Objects of the following type(s) are allowed in the list
91       * {@link Topic }
92       * 
93       * 
94       */
95      @OneToMany(targetEntity = Topic.class, cascade = {
96          CascadeType.ALL
97      })
98      @JoinColumn(name = "TOPIC_TOPICS_HJID")
99      public List<Topic> getTopic() {
100         if (topic == null) {
101             topic = new ArrayList<Topic>();
102         }
103         return this.topic;
104     }
105 
106     /***
107      * 
108      * 
109      */
110     public void setTopic(List<Topic> topic) {
111         this.topic = topic;
112     }
113 
114     /***
115      * Gets the value of the hjid property.
116      * 
117      * @return
118      *     possible object is
119      *     {@link Long }
120      *     
121      */
122     @Id
123     @Column(name = "HJID")
124     @GeneratedValue(strategy = GenerationType.AUTO)
125     public Long getHjid() {
126         return hjid;
127     }
128 
129     /***
130      * Sets the value of the hjid property.
131      * 
132      * @param value
133      *     allowed object is
134      *     {@link Long }
135      *     
136      */
137     public void setHjid(Long value) {
138         this.hjid = value;
139     }
140 
141     public void equals(Object object, EqualsBuilder equalsBuilder) {
142         if (!(object instanceof Topics)) {
143             equalsBuilder.appendSuper(false);
144             return ;
145         }
146         if (this == object) {
147             return ;
148         }
149         final Topics that = ((Topics) object);
150         equalsBuilder.append(this.getTopic(), that.getTopic());
151     }
152 
153     public boolean equals(Object object) {
154         if (!(object instanceof Topics)) {
155             return false;
156         }
157         if (this == object) {
158             return true;
159         }
160         final EqualsBuilder equalsBuilder = new JAXBEqualsBuilder();
161         equals(object, equalsBuilder);
162         return equalsBuilder.isEquals();
163     }
164 
165     public void hashCode(HashCodeBuilder hashCodeBuilder) {
166         hashCodeBuilder.append(this.getTopic());
167     }
168 
169     public int hashCode() {
170         final HashCodeBuilder hashCodeBuilder = new JAXBHashCodeBuilder();
171         hashCode(hashCodeBuilder);
172         return hashCodeBuilder.toHashCode();
173     }
174 
175 }