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:23:18 PM CEST 
6   //
7   
8   
9   package com.hack23.cia.model.internal.application.data.committee.impl;
10  
11  import java.io.Serializable;
12  import java.util.Date;
13  import javax.persistence.AttributeOverride;
14  import javax.persistence.AttributeOverrides;
15  import javax.persistence.Basic;
16  import javax.persistence.Column;
17  import javax.persistence.EmbeddedId;
18  import javax.persistence.Entity;
19  import javax.persistence.Inheritance;
20  import javax.persistence.InheritanceType;
21  import javax.persistence.Table;
22  import javax.persistence.Temporal;
23  import javax.persistence.TemporalType;
24  import javax.xml.bind.annotation.XmlAccessType;
25  import javax.xml.bind.annotation.XmlAccessorType;
26  import javax.xml.bind.annotation.XmlElement;
27  import javax.xml.bind.annotation.XmlSchemaType;
28  import javax.xml.bind.annotation.XmlType;
29  import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
30  import com.hack23.cia.model.common.api.ModelObject;
31  import org.jvnet.jaxb2_commons.lang.Equals;
32  import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
33  import org.jvnet.jaxb2_commons.lang.HashCode;
34  import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
35  import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
36  import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
37  import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
38  import org.jvnet.jaxb2_commons.lang.ToString;
39  import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
40  import org.jvnet.jaxb2_commons.locator.ObjectLocator;
41  import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
42  import org.w3._2001.xmlschema.Adapter3;
43  
44  
45  /**
46   * <p>Java class for ViewRiksdagenCommittee complex type.
47   * 
48   * <p>The following schema fragment specifies the expected content contained within this class.
49   * 
50   * <pre>
51   * &lt;complexType name="ViewRiksdagenCommittee"&gt;
52   *   &lt;complexContent&gt;
53   *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
54   *       &lt;sequence&gt;
55   *         &lt;element name="embeddedId" type="{http://committee.data.application.internal.model.cia.hack23.com/impl}RiksdagenCommitteeEmbeddedId"/&gt;
56   *         &lt;element name="totalAssignments" type="{http://www.w3.org/2001/XMLSchema}long"/&gt;
57   *         &lt;element name="firstAssignmentDate" type="{http://www.w3.org/2001/XMLSchema}date"/&gt;
58   *         &lt;element name="lastAssignmentDate" type="{http://www.w3.org/2001/XMLSchema}date"/&gt;
59   *         &lt;element name="totalDaysServed" type="{http://www.w3.org/2001/XMLSchema}long"/&gt;
60   *         &lt;element name="currentMemberSize" type="{http://www.w3.org/2001/XMLSchema}long"/&gt;
61   *         &lt;element name="active" type="{http://www.w3.org/2001/XMLSchema}boolean"/&gt;
62   *       &lt;/sequence&gt;
63   *     &lt;/restriction&gt;
64   *   &lt;/complexContent&gt;
65   * &lt;/complexType&gt;
66   * </pre>
67   * 
68   * 
69   */
70  @XmlAccessorType(XmlAccessType.FIELD)
71  @XmlType(name = "ViewRiksdagenCommittee", propOrder = {
72      "embeddedId",
73      "totalAssignments",
74      "firstAssignmentDate",
75      "lastAssignmentDate",
76      "totalDaysServed",
77      "currentMemberSize",
78      "active"
79  })
80  @Entity(name = "ViewRiksdagenCommittee")
81  @Table(name = "VIEW_RIKSDAGEN_COMMITTEE")
82  @Inheritance(strategy = InheritanceType.JOINED)
83  public class ViewRiksdagenCommittee
84      implements Serializable, ModelObject, Equals, HashCode, ToString
85  {
86  
87      private final static long serialVersionUID = 1L;
88      @XmlElement(required = true)
89      protected RiksdagenCommitteeEmbeddedId embeddedId;
90      protected long totalAssignments;
91      @XmlElement(required = true, type = String.class)
92      @XmlJavaTypeAdapter(Adapter3 .class)
93      @XmlSchemaType(name = "date")
94      protected Date firstAssignmentDate;
95      @XmlElement(required = true, type = String.class)
96      @XmlJavaTypeAdapter(Adapter3 .class)
97      @XmlSchemaType(name = "date")
98      protected Date lastAssignmentDate;
99      protected long totalDaysServed;
100     protected long currentMemberSize;
101     protected boolean active;
102 
103     /**
104      * Gets the value of the embeddedId property.
105      * 
106      * @return
107      *     possible object is
108      *     {@link RiksdagenCommitteeEmbeddedId }
109      *     
110      */
111     @EmbeddedId
112     @AttributeOverrides({
113         @AttributeOverride(name = "detail", column = @Column(name = "EMBEDDED_ID_DETAIL", length = 255)),
114         @AttributeOverride(name = "orgCode", column = @Column(name = "EMBEDDED_ID_ORG_CODE", length = 255))
115     })
116     public RiksdagenCommitteeEmbeddedId getEmbeddedId() {
117         return embeddedId;
118     }
119 
120     /**
121      * Sets the value of the embeddedId property.
122      * 
123      * @param value
124      *     allowed object is
125      *     {@link RiksdagenCommitteeEmbeddedId }
126      *     
127      */
128     public void setEmbeddedId(RiksdagenCommitteeEmbeddedId value) {
129         this.embeddedId = value;
130     }
131 
132     /**
133      * Gets the value of the totalAssignments property.
134      * 
135      */
136     @Basic
137     @Column(name = "TOTAL_ASSIGNMENTS", precision = 20, scale = 0)
138     public long getTotalAssignments() {
139         return totalAssignments;
140     }
141 
142     /**
143      * Sets the value of the totalAssignments property.
144      * 
145      */
146     public void setTotalAssignments(long value) {
147         this.totalAssignments = value;
148     }
149 
150     /**
151      * Gets the value of the firstAssignmentDate property.
152      * 
153      * @return
154      *     possible object is
155      *     {@link String }
156      *     
157      */
158     @Basic
159     @Column(name = "FIRST_ASSIGNMENT_DATE")
160     @Temporal(TemporalType.DATE)
161     public Date getFirstAssignmentDate() {
162         return firstAssignmentDate;
163     }
164 
165     /**
166      * Sets the value of the firstAssignmentDate property.
167      * 
168      * @param value
169      *     allowed object is
170      *     {@link String }
171      *     
172      */
173     public void setFirstAssignmentDate(Date value) {
174         this.firstAssignmentDate = value;
175     }
176 
177     /**
178      * Gets the value of the lastAssignmentDate property.
179      * 
180      * @return
181      *     possible object is
182      *     {@link String }
183      *     
184      */
185     @Basic
186     @Column(name = "LAST_ASSIGNMENT_DATE")
187     @Temporal(TemporalType.DATE)
188     public Date getLastAssignmentDate() {
189         return lastAssignmentDate;
190     }
191 
192     /**
193      * Sets the value of the lastAssignmentDate property.
194      * 
195      * @param value
196      *     allowed object is
197      *     {@link String }
198      *     
199      */
200     public void setLastAssignmentDate(Date value) {
201         this.lastAssignmentDate = value;
202     }
203 
204     /**
205      * Gets the value of the totalDaysServed property.
206      * 
207      */
208     @Basic
209     @Column(name = "TOTAL_DAYS_SERVED", precision = 20, scale = 0)
210     public long getTotalDaysServed() {
211         return totalDaysServed;
212     }
213 
214     /**
215      * Sets the value of the totalDaysServed property.
216      * 
217      */
218     public void setTotalDaysServed(long value) {
219         this.totalDaysServed = value;
220     }
221 
222     /**
223      * Gets the value of the currentMemberSize property.
224      * 
225      */
226     @Basic
227     @Column(name = "CURRENT_MEMBER_SIZE", precision = 20, scale = 0)
228     public long getCurrentMemberSize() {
229         return currentMemberSize;
230     }
231 
232     /**
233      * Sets the value of the currentMemberSize property.
234      * 
235      */
236     public void setCurrentMemberSize(long value) {
237         this.currentMemberSize = value;
238     }
239 
240     /**
241      * Gets the value of the active property.
242      * 
243      */
244     @Basic
245     @Column(name = "ACTIVE")
246     public boolean isActive() {
247         return active;
248     }
249 
250     /**
251      * Sets the value of the active property.
252      * 
253      */
254     public void setActive(boolean value) {
255         this.active = value;
256     }
257 
258     public ViewRiksdagenCommittee withEmbeddedId(RiksdagenCommitteeEmbeddedId value) {
259         setEmbeddedId(value);
260         return this;
261     }
262 
263     public ViewRiksdagenCommittee withTotalAssignments(long value) {
264         setTotalAssignments(value);
265         return this;
266     }
267 
268     public ViewRiksdagenCommittee withFirstAssignmentDate(Date value) {
269         setFirstAssignmentDate(value);
270         return this;
271     }
272 
273     public ViewRiksdagenCommittee withLastAssignmentDate(Date value) {
274         setLastAssignmentDate(value);
275         return this;
276     }
277 
278     public ViewRiksdagenCommittee withTotalDaysServed(long value) {
279         setTotalDaysServed(value);
280         return this;
281     }
282 
283     public ViewRiksdagenCommittee withCurrentMemberSize(long value) {
284         setCurrentMemberSize(value);
285         return this;
286     }
287 
288     public ViewRiksdagenCommittee withActive(boolean value) {
289         setActive(value);
290         return this;
291     }
292 
293     public String toString() {
294         final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
295         final StringBuilder buffer = new StringBuilder();
296         append(null, buffer, strategy);
297         return buffer.toString();
298     }
299 
300     public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
301         strategy.appendStart(locator, this, buffer);
302         appendFields(locator, buffer, strategy);
303         strategy.appendEnd(locator, this, buffer);
304         return buffer;
305     }
306 
307     public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
308         {
309             RiksdagenCommitteeEmbeddedId theEmbeddedId;
310             theEmbeddedId = this.getEmbeddedId();
311             strategy.appendField(locator, this, "embeddedId", buffer, theEmbeddedId);
312         }
313         {
314             long theTotalAssignments;
315             theTotalAssignments = this.getTotalAssignments();
316             strategy.appendField(locator, this, "totalAssignments", buffer, theTotalAssignments);
317         }
318         {
319             Date theFirstAssignmentDate;
320             theFirstAssignmentDate = this.getFirstAssignmentDate();
321             strategy.appendField(locator, this, "firstAssignmentDate", buffer, theFirstAssignmentDate);
322         }
323         {
324             Date theLastAssignmentDate;
325             theLastAssignmentDate = this.getLastAssignmentDate();
326             strategy.appendField(locator, this, "lastAssignmentDate", buffer, theLastAssignmentDate);
327         }
328         {
329             long theTotalDaysServed;
330             theTotalDaysServed = this.getTotalDaysServed();
331             strategy.appendField(locator, this, "totalDaysServed", buffer, theTotalDaysServed);
332         }
333         {
334             long theCurrentMemberSize;
335             theCurrentMemberSize = this.getCurrentMemberSize();
336             strategy.appendField(locator, this, "currentMemberSize", buffer, theCurrentMemberSize);
337         }
338         {
339             boolean theActive;
340             theActive = this.isActive();
341             strategy.appendField(locator, this, "active", buffer, theActive);
342         }
343         return buffer;
344     }
345 
346     public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
347         if ((object == null)||(this.getClass()!= object.getClass())) {
348             return false;
349         }
350         if (this == object) {
351             return true;
352         }
353         final ViewRiksdagenCommittee that = ((ViewRiksdagenCommittee) object);
354         {
355             RiksdagenCommitteeEmbeddedId lhsEmbeddedId;
356             lhsEmbeddedId = this.getEmbeddedId();
357             RiksdagenCommitteeEmbeddedId rhsEmbeddedId;
358             rhsEmbeddedId = that.getEmbeddedId();
359             if (!strategy.equals(LocatorUtils.property(thisLocator, "embeddedId", lhsEmbeddedId), LocatorUtils.property(thatLocator, "embeddedId", rhsEmbeddedId), lhsEmbeddedId, rhsEmbeddedId)) {
360                 return false;
361             }
362         }
363         {
364             long lhsTotalAssignments;
365             lhsTotalAssignments = this.getTotalAssignments();
366             long rhsTotalAssignments;
367             rhsTotalAssignments = that.getTotalAssignments();
368             if (!strategy.equals(LocatorUtils.property(thisLocator, "totalAssignments", lhsTotalAssignments), LocatorUtils.property(thatLocator, "totalAssignments", rhsTotalAssignments), lhsTotalAssignments, rhsTotalAssignments)) {
369                 return false;
370             }
371         }
372         {
373             Date lhsFirstAssignmentDate;
374             lhsFirstAssignmentDate = this.getFirstAssignmentDate();
375             Date rhsFirstAssignmentDate;
376             rhsFirstAssignmentDate = that.getFirstAssignmentDate();
377             if (!strategy.equals(LocatorUtils.property(thisLocator, "firstAssignmentDate", lhsFirstAssignmentDate), LocatorUtils.property(thatLocator, "firstAssignmentDate", rhsFirstAssignmentDate), lhsFirstAssignmentDate, rhsFirstAssignmentDate)) {
378                 return false;
379             }
380         }
381         {
382             Date lhsLastAssignmentDate;
383             lhsLastAssignmentDate = this.getLastAssignmentDate();
384             Date rhsLastAssignmentDate;
385             rhsLastAssignmentDate = that.getLastAssignmentDate();
386             if (!strategy.equals(LocatorUtils.property(thisLocator, "lastAssignmentDate", lhsLastAssignmentDate), LocatorUtils.property(thatLocator, "lastAssignmentDate", rhsLastAssignmentDate), lhsLastAssignmentDate, rhsLastAssignmentDate)) {
387                 return false;
388             }
389         }
390         {
391             long lhsTotalDaysServed;
392             lhsTotalDaysServed = this.getTotalDaysServed();
393             long rhsTotalDaysServed;
394             rhsTotalDaysServed = that.getTotalDaysServed();
395             if (!strategy.equals(LocatorUtils.property(thisLocator, "totalDaysServed", lhsTotalDaysServed), LocatorUtils.property(thatLocator, "totalDaysServed", rhsTotalDaysServed), lhsTotalDaysServed, rhsTotalDaysServed)) {
396                 return false;
397             }
398         }
399         {
400             long lhsCurrentMemberSize;
401             lhsCurrentMemberSize = this.getCurrentMemberSize();
402             long rhsCurrentMemberSize;
403             rhsCurrentMemberSize = that.getCurrentMemberSize();
404             if (!strategy.equals(LocatorUtils.property(thisLocator, "currentMemberSize", lhsCurrentMemberSize), LocatorUtils.property(thatLocator, "currentMemberSize", rhsCurrentMemberSize), lhsCurrentMemberSize, rhsCurrentMemberSize)) {
405                 return false;
406             }
407         }
408         {
409             boolean lhsActive;
410             lhsActive = this.isActive();
411             boolean rhsActive;
412             rhsActive = that.isActive();
413             if (!strategy.equals(LocatorUtils.property(thisLocator, "active", lhsActive), LocatorUtils.property(thatLocator, "active", rhsActive), lhsActive, rhsActive)) {
414                 return false;
415             }
416         }
417         return true;
418     }
419 
420     public boolean equals(Object object) {
421         final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
422         return equals(null, null, object, strategy);
423     }
424 
425     public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
426         int currentHashCode = 1;
427         {
428             RiksdagenCommitteeEmbeddedId theEmbeddedId;
429             theEmbeddedId = this.getEmbeddedId();
430             currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "embeddedId", theEmbeddedId), currentHashCode, theEmbeddedId);
431         }
432         {
433             long theTotalAssignments;
434             theTotalAssignments = this.getTotalAssignments();
435             currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "totalAssignments", theTotalAssignments), currentHashCode, theTotalAssignments);
436         }
437         {
438             Date theFirstAssignmentDate;
439             theFirstAssignmentDate = this.getFirstAssignmentDate();
440             currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "firstAssignmentDate", theFirstAssignmentDate), currentHashCode, theFirstAssignmentDate);
441         }
442         {
443             Date theLastAssignmentDate;
444             theLastAssignmentDate = this.getLastAssignmentDate();
445             currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "lastAssignmentDate", theLastAssignmentDate), currentHashCode, theLastAssignmentDate);
446         }
447         {
448             long theTotalDaysServed;
449             theTotalDaysServed = this.getTotalDaysServed();
450             currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "totalDaysServed", theTotalDaysServed), currentHashCode, theTotalDaysServed);
451         }
452         {
453             long theCurrentMemberSize;
454             theCurrentMemberSize = this.getCurrentMemberSize();
455             currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "currentMemberSize", theCurrentMemberSize), currentHashCode, theCurrentMemberSize);
456         }
457         {
458             boolean theActive;
459             theActive = this.isActive();
460             currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "active", theActive), currentHashCode, theActive);
461         }
462         return currentHashCode;
463     }
464 
465     public int hashCode() {
466         final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
467         return this.hashCode(null, strategy);
468     }
469 
470 }