View Javadoc
1   //
2   // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 
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: 2017.04.23 at 07:22:58 PM CEST 
6   //
7   
8   
9   package com.hack23.cia.model.external.riksdagen.votering.impl;
10  
11  import java.io.Serializable;
12  import javax.persistence.Basic;
13  import javax.persistence.Column;
14  import javax.persistence.Embeddable;
15  import javax.persistence.EnumType;
16  import javax.persistence.Enumerated;
17  import javax.xml.bind.annotation.XmlAccessType;
18  import javax.xml.bind.annotation.XmlAccessorType;
19  import javax.xml.bind.annotation.XmlElement;
20  import javax.xml.bind.annotation.XmlSchemaType;
21  import javax.xml.bind.annotation.XmlType;
22  import com.hack23.cia.model.common.api.ModelObject;
23  import org.jvnet.jaxb2_commons.lang.Equals;
24  import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
25  import org.jvnet.jaxb2_commons.lang.HashCode;
26  import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
27  import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
28  import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
29  import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
30  import org.jvnet.jaxb2_commons.lang.ToString;
31  import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
32  import org.jvnet.jaxb2_commons.locator.ObjectLocator;
33  import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
34  
35  
36  /**
37   * <p>Java class for VoteDataEmbeddedId complex type.
38   * 
39   * <p>The following schema fragment specifies the expected content contained within this class.
40   * 
41   * <pre>
42   * &lt;complexType name="VoteDataEmbeddedId"&gt;
43   *   &lt;complexContent&gt;
44   *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
45   *       &lt;sequence&gt;
46   *         &lt;element name="punkt" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
47   *         &lt;element name="votering_id" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
48   *         &lt;element name="intressent_id" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
49   *         &lt;element name="avser" type="{http://votering.riksdagen.external.model.cia.hack23.com/impl}VoteIssueType"/&gt;
50   *       &lt;/sequence&gt;
51   *     &lt;/restriction&gt;
52   *   &lt;/complexContent&gt;
53   * &lt;/complexType&gt;
54   * </pre>
55   * 
56   * 
57   */
58  @XmlAccessorType(XmlAccessType.FIELD)
59  @XmlType(name = "VoteDataEmbeddedId", propOrder = {
60      "issue",
61      "ballotId",
62      "intressentId",
63      "concern"
64  })
65  @Embeddable
66  public class VoteDataEmbeddedId
67      implements Serializable, ModelObject, Equals, HashCode, ToString
68  {
69  
70      @XmlElement(name = "punkt", required = true)
71      protected String issue;
72      @XmlElement(name = "votering_id", required = true)
73      protected String ballotId;
74      @XmlElement(name = "intressent_id", required = true)
75      protected String intressentId;
76      @XmlElement(name = "avser", required = true)
77      @XmlSchemaType(name = "string")
78      protected VoteIssueType concern;
79  
80      /**
81       * Gets the value of the issue property.
82       * 
83       * @return
84       *     possible object is
85       *     {@link String }
86       *     
87       */
88      @Basic
89      @Column(name = "ISSUE", length = 255)
90      public String getIssue() {
91          return issue;
92      }
93  
94      /**
95       * Sets the value of the issue property.
96       * 
97       * @param value
98       *     allowed object is
99       *     {@link String }
100      *     
101      */
102     public void setIssue(String value) {
103         this.issue = value;
104     }
105 
106     /**
107      * Gets the value of the ballotId property.
108      * 
109      * @return
110      *     possible object is
111      *     {@link String }
112      *     
113      */
114     @Basic
115     @Column(name = "BALLOT_ID", length = 255)
116     public String getBallotId() {
117         return ballotId;
118     }
119 
120     /**
121      * Sets the value of the ballotId property.
122      * 
123      * @param value
124      *     allowed object is
125      *     {@link String }
126      *     
127      */
128     public void setBallotId(String value) {
129         this.ballotId = value;
130     }
131 
132     /**
133      * Gets the value of the intressentId property.
134      * 
135      * @return
136      *     possible object is
137      *     {@link String }
138      *     
139      */
140     @Basic
141     @Column(name = "INTRESSENT_ID", length = 255)
142     public String getIntressentId() {
143         return intressentId;
144     }
145 
146     /**
147      * Sets the value of the intressentId property.
148      * 
149      * @param value
150      *     allowed object is
151      *     {@link String }
152      *     
153      */
154     public void setIntressentId(String value) {
155         this.intressentId = value;
156     }
157 
158     /**
159      * Gets the value of the concern property.
160      * 
161      * @return
162      *     possible object is
163      *     {@link VoteIssueType }
164      *     
165      */
166     @Basic
167     @Column(name = "CONCERN", length = 255)
168     @Enumerated(EnumType.STRING)
169     public VoteIssueType getConcern() {
170         return concern;
171     }
172 
173     /**
174      * Sets the value of the concern property.
175      * 
176      * @param value
177      *     allowed object is
178      *     {@link VoteIssueType }
179      *     
180      */
181     public void setConcern(VoteIssueType value) {
182         this.concern = value;
183     }
184 
185     public VoteDataEmbeddedId withIssue(String value) {
186         setIssue(value);
187         return this;
188     }
189 
190     public VoteDataEmbeddedId withBallotId(String value) {
191         setBallotId(value);
192         return this;
193     }
194 
195     public VoteDataEmbeddedId withIntressentId(String value) {
196         setIntressentId(value);
197         return this;
198     }
199 
200     public VoteDataEmbeddedId withConcern(VoteIssueType value) {
201         setConcern(value);
202         return this;
203     }
204 
205     public String toString() {
206         final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
207         final StringBuilder buffer = new StringBuilder();
208         append(null, buffer, strategy);
209         return buffer.toString();
210     }
211 
212     public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
213         strategy.appendStart(locator, this, buffer);
214         appendFields(locator, buffer, strategy);
215         strategy.appendEnd(locator, this, buffer);
216         return buffer;
217     }
218 
219     public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
220         {
221             String theIssue;
222             theIssue = this.getIssue();
223             strategy.appendField(locator, this, "issue", buffer, theIssue);
224         }
225         {
226             String theBallotId;
227             theBallotId = this.getBallotId();
228             strategy.appendField(locator, this, "ballotId", buffer, theBallotId);
229         }
230         {
231             String theIntressentId;
232             theIntressentId = this.getIntressentId();
233             strategy.appendField(locator, this, "intressentId", buffer, theIntressentId);
234         }
235         {
236             VoteIssueType theConcern;
237             theConcern = this.getConcern();
238             strategy.appendField(locator, this, "concern", buffer, theConcern);
239         }
240         return buffer;
241     }
242 
243     public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
244         if ((object == null)||(this.getClass()!= object.getClass())) {
245             return false;
246         }
247         if (this == object) {
248             return true;
249         }
250         final VoteDataEmbeddedId that = ((VoteDataEmbeddedId) object);
251         {
252             String lhsIssue;
253             lhsIssue = this.getIssue();
254             String rhsIssue;
255             rhsIssue = that.getIssue();
256             if (!strategy.equals(LocatorUtils.property(thisLocator, "issue", lhsIssue), LocatorUtils.property(thatLocator, "issue", rhsIssue), lhsIssue, rhsIssue)) {
257                 return false;
258             }
259         }
260         {
261             String lhsBallotId;
262             lhsBallotId = this.getBallotId();
263             String rhsBallotId;
264             rhsBallotId = that.getBallotId();
265             if (!strategy.equals(LocatorUtils.property(thisLocator, "ballotId", lhsBallotId), LocatorUtils.property(thatLocator, "ballotId", rhsBallotId), lhsBallotId, rhsBallotId)) {
266                 return false;
267             }
268         }
269         {
270             String lhsIntressentId;
271             lhsIntressentId = this.getIntressentId();
272             String rhsIntressentId;
273             rhsIntressentId = that.getIntressentId();
274             if (!strategy.equals(LocatorUtils.property(thisLocator, "intressentId", lhsIntressentId), LocatorUtils.property(thatLocator, "intressentId", rhsIntressentId), lhsIntressentId, rhsIntressentId)) {
275                 return false;
276             }
277         }
278         {
279             VoteIssueType lhsConcern;
280             lhsConcern = this.getConcern();
281             VoteIssueType rhsConcern;
282             rhsConcern = that.getConcern();
283             if (!strategy.equals(LocatorUtils.property(thisLocator, "concern", lhsConcern), LocatorUtils.property(thatLocator, "concern", rhsConcern), lhsConcern, rhsConcern)) {
284                 return false;
285             }
286         }
287         return true;
288     }
289 
290     public boolean equals(Object object) {
291         final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
292         return equals(null, null, object, strategy);
293     }
294 
295     public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
296         int currentHashCode = 1;
297         {
298             String theIssue;
299             theIssue = this.getIssue();
300             currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "issue", theIssue), currentHashCode, theIssue);
301         }
302         {
303             String theBallotId;
304             theBallotId = this.getBallotId();
305             currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "ballotId", theBallotId), currentHashCode, theBallotId);
306         }
307         {
308             String theIntressentId;
309             theIntressentId = this.getIntressentId();
310             currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "intressentId", theIntressentId), currentHashCode, theIntressentId);
311         }
312         {
313             VoteIssueType theConcern;
314             theConcern = this.getConcern();
315             currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "concern", theConcern), currentHashCode, theConcern);
316         }
317         return currentHashCode;
318     }
319 
320     public int hashCode() {
321         final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
322         return this.hashCode(null, strategy);
323     }
324 
325 }