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:51 PM CEST 
6   //
7   
8   
9   package com.hack23.cia.model.external.riksdagen.utskottsforslag.impl;
10  
11  import java.io.Serializable;
12  import javax.persistence.CascadeType;
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.JoinColumn;
21  import javax.persistence.ManyToOne;
22  import javax.persistence.Table;
23  import javax.xml.bind.annotation.XmlAccessType;
24  import javax.xml.bind.annotation.XmlAccessorType;
25  import javax.xml.bind.annotation.XmlAttribute;
26  import javax.xml.bind.annotation.XmlElement;
27  import javax.xml.bind.annotation.XmlType;
28  import com.hack23.cia.model.common.api.ModelObject;
29  import org.jvnet.jaxb2_commons.lang.Equals;
30  import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
31  import org.jvnet.jaxb2_commons.lang.HashCode;
32  import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
33  import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
34  import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
35  import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
36  import org.jvnet.jaxb2_commons.lang.ToString;
37  import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
38  import org.jvnet.jaxb2_commons.locator.ObjectLocator;
39  import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
40  
41  
42  /**
43   * <p>Java class for CommitteeProposalComponentData complex type.
44   * 
45   * <p>The following schema fragment specifies the expected content contained within this class.
46   * 
47   * <pre>
48   * &lt;complexType name="CommitteeProposalComponentData"&gt;
49   *   &lt;complexContent&gt;
50   *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
51   *       &lt;sequence&gt;
52   *         &lt;element name="dokmotforslag" type="{http://utskottsforslag.riksdagen.external.model.cia.hack23.com/impl}AgainstProposalContainer" minOccurs="0"/&gt;
53   *         &lt;sequence minOccurs="0"&gt;
54   *           &lt;element name="dokument" type="{http://utskottsforslag.riksdagen.external.model.cia.hack23.com/impl}CommitteeDocumentData"/&gt;
55   *           &lt;element name="dokutskottsforslag" type="{http://utskottsforslag.riksdagen.external.model.cia.hack23.com/impl}CommitteeProposalContainer"/&gt;
56   *         &lt;/sequence&gt;
57   *       &lt;/sequence&gt;
58   *     &lt;/restriction&gt;
59   *   &lt;/complexContent&gt;
60   * &lt;/complexType&gt;
61   * </pre>
62   * 
63   * 
64   */
65  @XmlAccessorType(XmlAccessType.FIELD)
66  @XmlType(name = "CommitteeProposalComponentData", propOrder = {
67      "againstProposalContainer",
68      "document",
69      "committeeProposalContainer"
70  })
71  @Entity(name = "CommitteeProposalComponentData")
72  @Table(name = "COMMITTEE_PROPOSAL_COMPONENT_0")
73  @Inheritance(strategy = InheritanceType.JOINED)
74  public class CommitteeProposalComponentData
75      implements Serializable, ModelObject, Equals, HashCode, ToString
76  {
77  
78      @XmlElement(name = "dokmotforslag")
79      protected AgainstProposalContainer againstProposalContainer;
80      @XmlElement(name = "dokument")
81      protected CommitteeDocumentData document;
82      @XmlElement(name = "dokutskottsforslag")
83      protected CommitteeProposalContainer committeeProposalContainer;
84      @XmlAttribute(name = "Hjid")
85      protected Long hjid;
86  
87      /**
88       * Gets the value of the againstProposalContainer property.
89       * 
90       * @return
91       *     possible object is
92       *     {@link AgainstProposalContainer }
93       *     
94       */
95      @ManyToOne(targetEntity = AgainstProposalContainer.class, cascade = {
96          CascadeType.ALL
97      })
98      @JoinColumn(name = "AGAINST_PROPOSAL_CONTAINER_C_0")
99      public AgainstProposalContainer getAgainstProposalContainer() {
100         return againstProposalContainer;
101     }
102 
103     /**
104      * Sets the value of the againstProposalContainer property.
105      * 
106      * @param value
107      *     allowed object is
108      *     {@link AgainstProposalContainer }
109      *     
110      */
111     public void setAgainstProposalContainer(AgainstProposalContainer value) {
112         this.againstProposalContainer = value;
113     }
114 
115     /**
116      * Gets the value of the document property.
117      * 
118      * @return
119      *     possible object is
120      *     {@link CommitteeDocumentData }
121      *     
122      */
123     @ManyToOne(targetEntity = CommitteeDocumentData.class, cascade = {
124         CascadeType.ALL
125     })
126     @JoinColumn(name = "DOCUMENT_COMMITTEE_PROPOSAL__0")
127     public CommitteeDocumentData getDocument() {
128         return document;
129     }
130 
131     /**
132      * Sets the value of the document property.
133      * 
134      * @param value
135      *     allowed object is
136      *     {@link CommitteeDocumentData }
137      *     
138      */
139     public void setDocument(CommitteeDocumentData value) {
140         this.document = value;
141     }
142 
143     /**
144      * Gets the value of the committeeProposalContainer property.
145      * 
146      * @return
147      *     possible object is
148      *     {@link CommitteeProposalContainer }
149      *     
150      */
151     @ManyToOne(targetEntity = CommitteeProposalContainer.class, cascade = {
152         CascadeType.ALL
153     })
154     @JoinColumn(name = "COMMITTEE_PROPOSAL_CONTAINER_0")
155     public CommitteeProposalContainer getCommitteeProposalContainer() {
156         return committeeProposalContainer;
157     }
158 
159     /**
160      * Sets the value of the committeeProposalContainer property.
161      * 
162      * @param value
163      *     allowed object is
164      *     {@link CommitteeProposalContainer }
165      *     
166      */
167     public void setCommitteeProposalContainer(CommitteeProposalContainer value) {
168         this.committeeProposalContainer = value;
169     }
170 
171     public CommitteeProposalComponentData withAgainstProposalContainer(AgainstProposalContainer value) {
172         setAgainstProposalContainer(value);
173         return this;
174     }
175 
176     public CommitteeProposalComponentData withDocument(CommitteeDocumentData value) {
177         setDocument(value);
178         return this;
179     }
180 
181     public CommitteeProposalComponentData withCommitteeProposalContainer(CommitteeProposalContainer value) {
182         setCommitteeProposalContainer(value);
183         return this;
184     }
185 
186     public String toString() {
187         final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
188         final StringBuilder buffer = new StringBuilder();
189         append(null, buffer, strategy);
190         return buffer.toString();
191     }
192 
193     public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
194         strategy.appendStart(locator, this, buffer);
195         appendFields(locator, buffer, strategy);
196         strategy.appendEnd(locator, this, buffer);
197         return buffer;
198     }
199 
200     public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
201         {
202             AgainstProposalContainer theAgainstProposalContainer;
203             theAgainstProposalContainer = this.getAgainstProposalContainer();
204             strategy.appendField(locator, this, "againstProposalContainer", buffer, theAgainstProposalContainer);
205         }
206         {
207             CommitteeDocumentData theDocument;
208             theDocument = this.getDocument();
209             strategy.appendField(locator, this, "document", buffer, theDocument);
210         }
211         {
212             CommitteeProposalContainer theCommitteeProposalContainer;
213             theCommitteeProposalContainer = this.getCommitteeProposalContainer();
214             strategy.appendField(locator, this, "committeeProposalContainer", buffer, theCommitteeProposalContainer);
215         }
216         return buffer;
217     }
218 
219     /**
220      * Gets the value of the hjid property.
221      * 
222      * @return
223      *     possible object is
224      *     {@link Long }
225      *     
226      */
227     @Id
228     @Column(name = "HJID")
229     @GeneratedValue(strategy = GenerationType.AUTO)
230     public Long getHjid() {
231         return hjid;
232     }
233 
234     /**
235      * Sets the value of the hjid property.
236      * 
237      * @param value
238      *     allowed object is
239      *     {@link Long }
240      *     
241      */
242     public void setHjid(Long value) {
243         this.hjid = value;
244     }
245 
246     public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
247         if ((object == null)||(this.getClass()!= object.getClass())) {
248             return false;
249         }
250         if (this == object) {
251             return true;
252         }
253         final CommitteeProposalComponentData that = ((CommitteeProposalComponentData) object);
254         {
255             AgainstProposalContainer lhsAgainstProposalContainer;
256             lhsAgainstProposalContainer = this.getAgainstProposalContainer();
257             AgainstProposalContainer rhsAgainstProposalContainer;
258             rhsAgainstProposalContainer = that.getAgainstProposalContainer();
259             if (!strategy.equals(LocatorUtils.property(thisLocator, "againstProposalContainer", lhsAgainstProposalContainer), LocatorUtils.property(thatLocator, "againstProposalContainer", rhsAgainstProposalContainer), lhsAgainstProposalContainer, rhsAgainstProposalContainer)) {
260                 return false;
261             }
262         }
263         {
264             CommitteeDocumentData lhsDocument;
265             lhsDocument = this.getDocument();
266             CommitteeDocumentData rhsDocument;
267             rhsDocument = that.getDocument();
268             if (!strategy.equals(LocatorUtils.property(thisLocator, "document", lhsDocument), LocatorUtils.property(thatLocator, "document", rhsDocument), lhsDocument, rhsDocument)) {
269                 return false;
270             }
271         }
272         {
273             CommitteeProposalContainer lhsCommitteeProposalContainer;
274             lhsCommitteeProposalContainer = this.getCommitteeProposalContainer();
275             CommitteeProposalContainer rhsCommitteeProposalContainer;
276             rhsCommitteeProposalContainer = that.getCommitteeProposalContainer();
277             if (!strategy.equals(LocatorUtils.property(thisLocator, "committeeProposalContainer", lhsCommitteeProposalContainer), LocatorUtils.property(thatLocator, "committeeProposalContainer", rhsCommitteeProposalContainer), lhsCommitteeProposalContainer, rhsCommitteeProposalContainer)) {
278                 return false;
279             }
280         }
281         return true;
282     }
283 
284     public boolean equals(Object object) {
285         final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
286         return equals(null, null, object, strategy);
287     }
288 
289     public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
290         int currentHashCode = 1;
291         {
292             AgainstProposalContainer theAgainstProposalContainer;
293             theAgainstProposalContainer = this.getAgainstProposalContainer();
294             currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "againstProposalContainer", theAgainstProposalContainer), currentHashCode, theAgainstProposalContainer);
295         }
296         {
297             CommitteeDocumentData theDocument;
298             theDocument = this.getDocument();
299             currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "document", theDocument), currentHashCode, theDocument);
300         }
301         {
302             CommitteeProposalContainer theCommitteeProposalContainer;
303             theCommitteeProposalContainer = this.getCommitteeProposalContainer();
304             currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "committeeProposalContainer", theCommitteeProposalContainer), currentHashCode, theCommitteeProposalContainer);
305         }
306         return currentHashCode;
307     }
308 
309     public int hashCode() {
310         final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
311         return this.hashCode(null, strategy);
312     }
313 
314 }