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 javax.persistence.Basic;
13  import javax.persistence.Column;
14  import javax.persistence.Embeddable;
15  import javax.xml.bind.annotation.XmlAccessType;
16  import javax.xml.bind.annotation.XmlAccessorType;
17  import javax.xml.bind.annotation.XmlElement;
18  import javax.xml.bind.annotation.XmlType;
19  import com.hack23.cia.model.common.api.ModelObject;
20  import org.jvnet.jaxb2_commons.lang.Equals;
21  import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
22  import org.jvnet.jaxb2_commons.lang.HashCode;
23  import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
24  import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
25  import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
26  import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
27  import org.jvnet.jaxb2_commons.lang.ToString;
28  import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
29  import org.jvnet.jaxb2_commons.locator.ObjectLocator;
30  import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
31  
32  
33  /**
34   * <p>Java class for RiksdagenCommitteeEmbeddedId complex type.
35   * 
36   * <p>The following schema fragment specifies the expected content contained within this class.
37   * 
38   * <pre>
39   * &lt;complexType name="RiksdagenCommitteeEmbeddedId"&gt;
40   *   &lt;complexContent&gt;
41   *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
42   *       &lt;sequence&gt;
43   *         &lt;element name="detail" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
44   *         &lt;element name="orgCode" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
45   *       &lt;/sequence&gt;
46   *     &lt;/restriction&gt;
47   *   &lt;/complexContent&gt;
48   * &lt;/complexType&gt;
49   * </pre>
50   * 
51   * 
52   */
53  @XmlAccessorType(XmlAccessType.FIELD)
54  @XmlType(name = "RiksdagenCommitteeEmbeddedId", propOrder = {
55      "detail",
56      "orgCode"
57  })
58  @Embeddable
59  public class RiksdagenCommitteeEmbeddedId
60      implements Serializable, ModelObject, Equals, HashCode, ToString
61  {
62  
63      private final static long serialVersionUID = 1L;
64      @XmlElement(required = true)
65      protected String detail;
66      @XmlElement(required = true)
67      protected String orgCode;
68  
69      /**
70       * Gets the value of the detail property.
71       * 
72       * @return
73       *     possible object is
74       *     {@link String }
75       *     
76       */
77      @Basic
78      @Column(name = "DETAIL", length = 255)
79      public String getDetail() {
80          return detail;
81      }
82  
83      /**
84       * Sets the value of the detail property.
85       * 
86       * @param value
87       *     allowed object is
88       *     {@link String }
89       *     
90       */
91      public void setDetail(String value) {
92          this.detail = value;
93      }
94  
95      /**
96       * Gets the value of the orgCode property.
97       * 
98       * @return
99       *     possible object is
100      *     {@link String }
101      *     
102      */
103     @Basic
104     @Column(name = "ORG_CODE", length = 255)
105     public String getOrgCode() {
106         return orgCode;
107     }
108 
109     /**
110      * Sets the value of the orgCode property.
111      * 
112      * @param value
113      *     allowed object is
114      *     {@link String }
115      *     
116      */
117     public void setOrgCode(String value) {
118         this.orgCode = value;
119     }
120 
121     public RiksdagenCommitteeEmbeddedId withDetail(String value) {
122         setDetail(value);
123         return this;
124     }
125 
126     public RiksdagenCommitteeEmbeddedId withOrgCode(String value) {
127         setOrgCode(value);
128         return this;
129     }
130 
131     public String toString() {
132         final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
133         final StringBuilder buffer = new StringBuilder();
134         append(null, buffer, strategy);
135         return buffer.toString();
136     }
137 
138     public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
139         strategy.appendStart(locator, this, buffer);
140         appendFields(locator, buffer, strategy);
141         strategy.appendEnd(locator, this, buffer);
142         return buffer;
143     }
144 
145     public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
146         {
147             String theDetail;
148             theDetail = this.getDetail();
149             strategy.appendField(locator, this, "detail", buffer, theDetail);
150         }
151         {
152             String theOrgCode;
153             theOrgCode = this.getOrgCode();
154             strategy.appendField(locator, this, "orgCode", buffer, theOrgCode);
155         }
156         return buffer;
157     }
158 
159     public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
160         if ((object == null)||(this.getClass()!= object.getClass())) {
161             return false;
162         }
163         if (this == object) {
164             return true;
165         }
166         final RiksdagenCommitteeEmbeddedId that = ((RiksdagenCommitteeEmbeddedId) object);
167         {
168             String lhsDetail;
169             lhsDetail = this.getDetail();
170             String rhsDetail;
171             rhsDetail = that.getDetail();
172             if (!strategy.equals(LocatorUtils.property(thisLocator, "detail", lhsDetail), LocatorUtils.property(thatLocator, "detail", rhsDetail), lhsDetail, rhsDetail)) {
173                 return false;
174             }
175         }
176         {
177             String lhsOrgCode;
178             lhsOrgCode = this.getOrgCode();
179             String rhsOrgCode;
180             rhsOrgCode = that.getOrgCode();
181             if (!strategy.equals(LocatorUtils.property(thisLocator, "orgCode", lhsOrgCode), LocatorUtils.property(thatLocator, "orgCode", rhsOrgCode), lhsOrgCode, rhsOrgCode)) {
182                 return false;
183             }
184         }
185         return true;
186     }
187 
188     public boolean equals(Object object) {
189         final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
190         return equals(null, null, object, strategy);
191     }
192 
193     public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
194         int currentHashCode = 1;
195         {
196             String theDetail;
197             theDetail = this.getDetail();
198             currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "detail", theDetail), currentHashCode, theDetail);
199         }
200         {
201             String theOrgCode;
202             theOrgCode = this.getOrgCode();
203             currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "orgCode", theOrgCode), currentHashCode, theOrgCode);
204         }
205         return currentHashCode;
206     }
207 
208     public int hashCode() {
209         final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
210         return this.hashCode(null, strategy);
211     }
212 
213 }