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:35 PM CEST 
6   //
7   
8   
9   package com.hack23.cia.model.external.riksdagen.documentcontent.impl;
10  
11  import java.io.Serializable;
12  import javax.persistence.Basic;
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.Table;
21  import javax.xml.bind.annotation.XmlAccessType;
22  import javax.xml.bind.annotation.XmlAccessorType;
23  import javax.xml.bind.annotation.XmlAttribute;
24  import javax.xml.bind.annotation.XmlElement;
25  import javax.xml.bind.annotation.XmlType;
26  import com.hack23.cia.model.common.api.ModelObject;
27  import org.jvnet.jaxb2_commons.lang.Equals;
28  import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
29  import org.jvnet.jaxb2_commons.lang.HashCode;
30  import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
31  import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
32  import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
33  import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
34  import org.jvnet.jaxb2_commons.lang.ToString;
35  import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
36  import org.jvnet.jaxb2_commons.locator.ObjectLocator;
37  import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
38  
39  
40  /**
41   * <p>Java class for DocumentContentData complex type.
42   * 
43   * <p>The following schema fragment specifies the expected content contained within this class.
44   * 
45   * <pre>
46   * &lt;complexType name="DocumentContentData"&gt;
47   *   &lt;complexContent&gt;
48   *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
49   *       &lt;sequence&gt;
50   *         &lt;element name="id" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
51   *         &lt;element name="content" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
52   *       &lt;/sequence&gt;
53   *     &lt;/restriction&gt;
54   *   &lt;/complexContent&gt;
55   * &lt;/complexType&gt;
56   * </pre>
57   * 
58   * 
59   */
60  @XmlAccessorType(XmlAccessType.FIELD)
61  @XmlType(name = "DocumentContentData", propOrder = {
62      "id",
63      "content"
64  })
65  @Entity(name = "DocumentContentData")
66  @Table(name = "DOCUMENT_CONTENT_DATA")
67  @Inheritance(strategy = InheritanceType.JOINED)
68  public class DocumentContentData
69      implements Serializable, ModelObject, Equals, HashCode, ToString
70  {
71  
72      @XmlElement(required = true)
73      protected String id;
74      @XmlElement(required = true)
75      protected String content;
76      @XmlAttribute(name = "Hjid")
77      protected Long hjid;
78  
79      /**
80       * Gets the value of the id property.
81       * 
82       * @return
83       *     possible object is
84       *     {@link String }
85       *     
86       */
87      @Basic
88      @Column(name = "ID", length = 255)
89      public String getId() {
90          return id;
91      }
92  
93      /**
94       * Sets the value of the id property.
95       * 
96       * @param value
97       *     allowed object is
98       *     {@link String }
99       *     
100      */
101     public void setId(String value) {
102         this.id = value;
103     }
104 
105     /**
106      * Gets the value of the content property.
107      * 
108      * @return
109      *     possible object is
110      *     {@link String }
111      *     
112      */
113     @Basic
114     @Column(name = "CONTENT", length = 10485760)
115     public String getContent() {
116         return content;
117     }
118 
119     /**
120      * Sets the value of the content property.
121      * 
122      * @param value
123      *     allowed object is
124      *     {@link String }
125      *     
126      */
127     public void setContent(String value) {
128         this.content = value;
129     }
130 
131     public DocumentContentData withId(String value) {
132         setId(value);
133         return this;
134     }
135 
136     public DocumentContentData withContent(String value) {
137         setContent(value);
138         return this;
139     }
140 
141     public String toString() {
142         final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
143         final StringBuilder buffer = new StringBuilder();
144         append(null, buffer, strategy);
145         return buffer.toString();
146     }
147 
148     public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
149         strategy.appendStart(locator, this, buffer);
150         appendFields(locator, buffer, strategy);
151         strategy.appendEnd(locator, this, buffer);
152         return buffer;
153     }
154 
155     public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
156         {
157             String theId;
158             theId = this.getId();
159             strategy.appendField(locator, this, "id", buffer, theId);
160         }
161         {
162             String theContent;
163             theContent = this.getContent();
164             strategy.appendField(locator, this, "content", buffer, theContent);
165         }
166         return buffer;
167     }
168 
169     /**
170      * Gets the value of the hjid property.
171      * 
172      * @return
173      *     possible object is
174      *     {@link Long }
175      *     
176      */
177     @Id
178     @Column(name = "HJID")
179     @GeneratedValue(strategy = GenerationType.AUTO)
180     public Long getHjid() {
181         return hjid;
182     }
183 
184     /**
185      * Sets the value of the hjid property.
186      * 
187      * @param value
188      *     allowed object is
189      *     {@link Long }
190      *     
191      */
192     public void setHjid(Long value) {
193         this.hjid = value;
194     }
195 
196     public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
197         if ((object == null)||(this.getClass()!= object.getClass())) {
198             return false;
199         }
200         if (this == object) {
201             return true;
202         }
203         final DocumentContentData that = ((DocumentContentData) object);
204         {
205             String lhsId;
206             lhsId = this.getId();
207             String rhsId;
208             rhsId = that.getId();
209             if (!strategy.equals(LocatorUtils.property(thisLocator, "id", lhsId), LocatorUtils.property(thatLocator, "id", rhsId), lhsId, rhsId)) {
210                 return false;
211             }
212         }
213         {
214             String lhsContent;
215             lhsContent = this.getContent();
216             String rhsContent;
217             rhsContent = that.getContent();
218             if (!strategy.equals(LocatorUtils.property(thisLocator, "content", lhsContent), LocatorUtils.property(thatLocator, "content", rhsContent), lhsContent, rhsContent)) {
219                 return false;
220             }
221         }
222         return true;
223     }
224 
225     public boolean equals(Object object) {
226         final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
227         return equals(null, null, object, strategy);
228     }
229 
230     public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
231         int currentHashCode = 1;
232         {
233             String theId;
234             theId = this.getId();
235             currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "id", theId), currentHashCode, theId);
236         }
237         {
238             String theContent;
239             theContent = this.getContent();
240             currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "content", theContent), currentHashCode, theContent);
241         }
242         return currentHashCode;
243     }
244 
245     public int hashCode() {
246         final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
247         return this.hashCode(null, strategy);
248     }
249 
250 }