1
2
3
4
5
6
7
8
9 package com.hack23.cia.model.internal.application.system.impl;
10
11 import java.io.Serializable;
12 import java.util.Date;
13 import javax.persistence.Basic;
14 import javax.persistence.Column;
15 import javax.persistence.Entity;
16 import javax.persistence.GeneratedValue;
17 import javax.persistence.GenerationType;
18 import javax.persistence.Id;
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.XmlAttribute;
27 import javax.xml.bind.annotation.XmlElement;
28 import javax.xml.bind.annotation.XmlSchemaType;
29 import javax.xml.bind.annotation.XmlType;
30 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
31 import com.hack23.cia.model.common.api.ModelObject;
32 import org.jvnet.jaxb2_commons.lang.Equals;
33 import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
34 import org.jvnet.jaxb2_commons.lang.HashCode;
35 import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
36 import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
37 import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
38 import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
39 import org.jvnet.jaxb2_commons.lang.ToString;
40 import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
41 import org.jvnet.jaxb2_commons.locator.ObjectLocator;
42 import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
43 import org.w3._2001.xmlschema.Adapter1;
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73 @XmlAccessorType(XmlAccessType.FIELD)
74 @XmlType(name = "LanguageData", propOrder = {
75 "modelObjectId",
76 "modelObjectVersion",
77 "createdDate",
78 "languageName",
79 "languageCode",
80 "translationStatus",
81 "languageEnabled",
82 "autoTranslationEnabled",
83 "lastModifiedDate"
84 })
85 @Entity(name = "LanguageData")
86 @Table(name = "LANGUAGE_DATA")
87 @Inheritance(strategy = InheritanceType.JOINED)
88 public class LanguageData
89 implements Serializable, ModelObject, Equals, HashCode, ToString
90 {
91
92 private final static long serialVersionUID = 1L;
93 protected Integer modelObjectId;
94 protected Integer modelObjectVersion;
95 @XmlElement(type = String.class)
96 @XmlJavaTypeAdapter(Adapter1 .class)
97 @XmlSchemaType(name = "dateTime")
98 protected Date createdDate;
99 protected String languageName;
100 protected String languageCode;
101 protected String translationStatus;
102 protected Boolean languageEnabled;
103 protected Boolean autoTranslationEnabled;
104 @XmlElement(type = String.class)
105 @XmlJavaTypeAdapter(Adapter1 .class)
106 @XmlSchemaType(name = "dateTime")
107 protected Date lastModifiedDate;
108 @XmlAttribute(name = "Hjid")
109 protected Long hjid;
110
111
112
113
114
115
116
117
118
119 @Basic
120 @Column(name = "MODEL_OBJECT_ID", precision = 10, scale = 0)
121 public Integer getModelObjectId() {
122 return modelObjectId;
123 }
124
125
126
127
128
129
130
131
132
133 public void setModelObjectId(Integer value) {
134 this.modelObjectId = value;
135 }
136
137
138
139
140
141
142
143
144
145 @Basic
146 @Column(name = "MODEL_OBJECT_VERSION", precision = 10, scale = 0)
147 public Integer getModelObjectVersion() {
148 return modelObjectVersion;
149 }
150
151
152
153
154
155
156
157
158
159 public void setModelObjectVersion(Integer value) {
160 this.modelObjectVersion = value;
161 }
162
163
164
165
166
167
168
169
170
171 @Basic
172 @Column(name = "CREATED_DATE")
173 @Temporal(TemporalType.TIMESTAMP)
174 public Date getCreatedDate() {
175 return createdDate;
176 }
177
178
179
180
181
182
183
184
185
186 public void setCreatedDate(Date value) {
187 this.createdDate = value;
188 }
189
190
191
192
193
194
195
196
197
198 @Basic
199 @Column(name = "LANGUAGE_NAME", length = 255)
200 public String getLanguageName() {
201 return languageName;
202 }
203
204
205
206
207
208
209
210
211
212 public void setLanguageName(String value) {
213 this.languageName = value;
214 }
215
216
217
218
219
220
221
222
223
224 @Basic
225 @Column(name = "LANGUAGE_CODE", length = 255)
226 public String getLanguageCode() {
227 return languageCode;
228 }
229
230
231
232
233
234
235
236
237
238 public void setLanguageCode(String value) {
239 this.languageCode = value;
240 }
241
242
243
244
245
246
247
248
249
250 @Basic
251 @Column(name = "TRANSLATION_STATUS", length = 255)
252 public String getTranslationStatus() {
253 return translationStatus;
254 }
255
256
257
258
259
260
261
262
263
264 public void setTranslationStatus(String value) {
265 this.translationStatus = value;
266 }
267
268
269
270
271
272
273
274
275
276 @Basic
277 @Column(name = "LANGUAGE_ENABLED")
278 public Boolean isLanguageEnabled() {
279 return languageEnabled;
280 }
281
282
283
284
285
286
287
288
289
290 public void setLanguageEnabled(Boolean value) {
291 this.languageEnabled = value;
292 }
293
294
295
296
297
298
299
300
301
302 @Basic
303 @Column(name = "AUTO_TRANSLATION_ENABLED")
304 public Boolean isAutoTranslationEnabled() {
305 return autoTranslationEnabled;
306 }
307
308
309
310
311
312
313
314
315
316 public void setAutoTranslationEnabled(Boolean value) {
317 this.autoTranslationEnabled = value;
318 }
319
320
321
322
323
324
325
326
327
328 @Basic
329 @Column(name = "LAST_MODIFIED_DATE")
330 @Temporal(TemporalType.TIMESTAMP)
331 public Date getLastModifiedDate() {
332 return lastModifiedDate;
333 }
334
335
336
337
338
339
340
341
342
343 public void setLastModifiedDate(Date value) {
344 this.lastModifiedDate = value;
345 }
346
347 public LanguageData withModelObjectId(Integer value) {
348 setModelObjectId(value);
349 return this;
350 }
351
352 public LanguageData withModelObjectVersion(Integer value) {
353 setModelObjectVersion(value);
354 return this;
355 }
356
357 public LanguageData withCreatedDate(Date value) {
358 setCreatedDate(value);
359 return this;
360 }
361
362 public LanguageData withLanguageName(String value) {
363 setLanguageName(value);
364 return this;
365 }
366
367 public LanguageData withLanguageCode(String value) {
368 setLanguageCode(value);
369 return this;
370 }
371
372 public LanguageData withTranslationStatus(String value) {
373 setTranslationStatus(value);
374 return this;
375 }
376
377 public LanguageData withLanguageEnabled(Boolean value) {
378 setLanguageEnabled(value);
379 return this;
380 }
381
382 public LanguageData withAutoTranslationEnabled(Boolean value) {
383 setAutoTranslationEnabled(value);
384 return this;
385 }
386
387 public LanguageData withLastModifiedDate(Date value) {
388 setLastModifiedDate(value);
389 return this;
390 }
391
392 public String toString() {
393 final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
394 final StringBuilder buffer = new StringBuilder();
395 append(null, buffer, strategy);
396 return buffer.toString();
397 }
398
399 public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
400 strategy.appendStart(locator, this, buffer);
401 appendFields(locator, buffer, strategy);
402 strategy.appendEnd(locator, this, buffer);
403 return buffer;
404 }
405
406 public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
407 {
408 Integer theModelObjectId;
409 theModelObjectId = this.getModelObjectId();
410 strategy.appendField(locator, this, "modelObjectId", buffer, theModelObjectId);
411 }
412 {
413 Integer theModelObjectVersion;
414 theModelObjectVersion = this.getModelObjectVersion();
415 strategy.appendField(locator, this, "modelObjectVersion", buffer, theModelObjectVersion);
416 }
417 {
418 Date theCreatedDate;
419 theCreatedDate = this.getCreatedDate();
420 strategy.appendField(locator, this, "createdDate", buffer, theCreatedDate);
421 }
422 {
423 String theLanguageName;
424 theLanguageName = this.getLanguageName();
425 strategy.appendField(locator, this, "languageName", buffer, theLanguageName);
426 }
427 {
428 String theLanguageCode;
429 theLanguageCode = this.getLanguageCode();
430 strategy.appendField(locator, this, "languageCode", buffer, theLanguageCode);
431 }
432 {
433 String theTranslationStatus;
434 theTranslationStatus = this.getTranslationStatus();
435 strategy.appendField(locator, this, "translationStatus", buffer, theTranslationStatus);
436 }
437 {
438 Boolean theLanguageEnabled;
439 theLanguageEnabled = this.isLanguageEnabled();
440 strategy.appendField(locator, this, "languageEnabled", buffer, theLanguageEnabled);
441 }
442 {
443 Boolean theAutoTranslationEnabled;
444 theAutoTranslationEnabled = this.isAutoTranslationEnabled();
445 strategy.appendField(locator, this, "autoTranslationEnabled", buffer, theAutoTranslationEnabled);
446 }
447 {
448 Date theLastModifiedDate;
449 theLastModifiedDate = this.getLastModifiedDate();
450 strategy.appendField(locator, this, "lastModifiedDate", buffer, theLastModifiedDate);
451 }
452 return buffer;
453 }
454
455
456
457
458
459
460
461
462
463 @Id
464 @Column(name = "HJID")
465 @GeneratedValue(strategy = GenerationType.AUTO)
466 public Long getHjid() {
467 return hjid;
468 }
469
470
471
472
473
474
475
476
477
478 public void setHjid(Long value) {
479 this.hjid = value;
480 }
481
482 public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
483 if ((object == null)||(this.getClass()!= object.getClass())) {
484 return false;
485 }
486 if (this == object) {
487 return true;
488 }
489 final LanguageData that = ((LanguageData) object);
490 {
491 Integer lhsModelObjectId;
492 lhsModelObjectId = this.getModelObjectId();
493 Integer rhsModelObjectId;
494 rhsModelObjectId = that.getModelObjectId();
495 if (!strategy.equals(LocatorUtils.property(thisLocator, "modelObjectId", lhsModelObjectId), LocatorUtils.property(thatLocator, "modelObjectId", rhsModelObjectId), lhsModelObjectId, rhsModelObjectId)) {
496 return false;
497 }
498 }
499 {
500 Integer lhsModelObjectVersion;
501 lhsModelObjectVersion = this.getModelObjectVersion();
502 Integer rhsModelObjectVersion;
503 rhsModelObjectVersion = that.getModelObjectVersion();
504 if (!strategy.equals(LocatorUtils.property(thisLocator, "modelObjectVersion", lhsModelObjectVersion), LocatorUtils.property(thatLocator, "modelObjectVersion", rhsModelObjectVersion), lhsModelObjectVersion, rhsModelObjectVersion)) {
505 return false;
506 }
507 }
508 {
509 Date lhsCreatedDate;
510 lhsCreatedDate = this.getCreatedDate();
511 Date rhsCreatedDate;
512 rhsCreatedDate = that.getCreatedDate();
513 if (!strategy.equals(LocatorUtils.property(thisLocator, "createdDate", lhsCreatedDate), LocatorUtils.property(thatLocator, "createdDate", rhsCreatedDate), lhsCreatedDate, rhsCreatedDate)) {
514 return false;
515 }
516 }
517 {
518 String lhsLanguageName;
519 lhsLanguageName = this.getLanguageName();
520 String rhsLanguageName;
521 rhsLanguageName = that.getLanguageName();
522 if (!strategy.equals(LocatorUtils.property(thisLocator, "languageName", lhsLanguageName), LocatorUtils.property(thatLocator, "languageName", rhsLanguageName), lhsLanguageName, rhsLanguageName)) {
523 return false;
524 }
525 }
526 {
527 String lhsLanguageCode;
528 lhsLanguageCode = this.getLanguageCode();
529 String rhsLanguageCode;
530 rhsLanguageCode = that.getLanguageCode();
531 if (!strategy.equals(LocatorUtils.property(thisLocator, "languageCode", lhsLanguageCode), LocatorUtils.property(thatLocator, "languageCode", rhsLanguageCode), lhsLanguageCode, rhsLanguageCode)) {
532 return false;
533 }
534 }
535 {
536 String lhsTranslationStatus;
537 lhsTranslationStatus = this.getTranslationStatus();
538 String rhsTranslationStatus;
539 rhsTranslationStatus = that.getTranslationStatus();
540 if (!strategy.equals(LocatorUtils.property(thisLocator, "translationStatus", lhsTranslationStatus), LocatorUtils.property(thatLocator, "translationStatus", rhsTranslationStatus), lhsTranslationStatus, rhsTranslationStatus)) {
541 return false;
542 }
543 }
544 {
545 Boolean lhsLanguageEnabled;
546 lhsLanguageEnabled = this.isLanguageEnabled();
547 Boolean rhsLanguageEnabled;
548 rhsLanguageEnabled = that.isLanguageEnabled();
549 if (!strategy.equals(LocatorUtils.property(thisLocator, "languageEnabled", lhsLanguageEnabled), LocatorUtils.property(thatLocator, "languageEnabled", rhsLanguageEnabled), lhsLanguageEnabled, rhsLanguageEnabled)) {
550 return false;
551 }
552 }
553 {
554 Boolean lhsAutoTranslationEnabled;
555 lhsAutoTranslationEnabled = this.isAutoTranslationEnabled();
556 Boolean rhsAutoTranslationEnabled;
557 rhsAutoTranslationEnabled = that.isAutoTranslationEnabled();
558 if (!strategy.equals(LocatorUtils.property(thisLocator, "autoTranslationEnabled", lhsAutoTranslationEnabled), LocatorUtils.property(thatLocator, "autoTranslationEnabled", rhsAutoTranslationEnabled), lhsAutoTranslationEnabled, rhsAutoTranslationEnabled)) {
559 return false;
560 }
561 }
562 {
563 Date lhsLastModifiedDate;
564 lhsLastModifiedDate = this.getLastModifiedDate();
565 Date rhsLastModifiedDate;
566 rhsLastModifiedDate = that.getLastModifiedDate();
567 if (!strategy.equals(LocatorUtils.property(thisLocator, "lastModifiedDate", lhsLastModifiedDate), LocatorUtils.property(thatLocator, "lastModifiedDate", rhsLastModifiedDate), lhsLastModifiedDate, rhsLastModifiedDate)) {
568 return false;
569 }
570 }
571 return true;
572 }
573
574 public boolean equals(Object object) {
575 final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
576 return equals(null, null, object, strategy);
577 }
578
579 public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
580 int currentHashCode = 1;
581 {
582 Integer theModelObjectId;
583 theModelObjectId = this.getModelObjectId();
584 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "modelObjectId", theModelObjectId), currentHashCode, theModelObjectId);
585 }
586 {
587 Integer theModelObjectVersion;
588 theModelObjectVersion = this.getModelObjectVersion();
589 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "modelObjectVersion", theModelObjectVersion), currentHashCode, theModelObjectVersion);
590 }
591 {
592 Date theCreatedDate;
593 theCreatedDate = this.getCreatedDate();
594 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "createdDate", theCreatedDate), currentHashCode, theCreatedDate);
595 }
596 {
597 String theLanguageName;
598 theLanguageName = this.getLanguageName();
599 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "languageName", theLanguageName), currentHashCode, theLanguageName);
600 }
601 {
602 String theLanguageCode;
603 theLanguageCode = this.getLanguageCode();
604 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "languageCode", theLanguageCode), currentHashCode, theLanguageCode);
605 }
606 {
607 String theTranslationStatus;
608 theTranslationStatus = this.getTranslationStatus();
609 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "translationStatus", theTranslationStatus), currentHashCode, theTranslationStatus);
610 }
611 {
612 Boolean theLanguageEnabled;
613 theLanguageEnabled = this.isLanguageEnabled();
614 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "languageEnabled", theLanguageEnabled), currentHashCode, theLanguageEnabled);
615 }
616 {
617 Boolean theAutoTranslationEnabled;
618 theAutoTranslationEnabled = this.isAutoTranslationEnabled();
619 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "autoTranslationEnabled", theAutoTranslationEnabled), currentHashCode, theAutoTranslationEnabled);
620 }
621 {
622 Date theLastModifiedDate;
623 theLastModifiedDate = this.getLastModifiedDate();
624 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "lastModifiedDate", theLastModifiedDate), currentHashCode, theLastModifiedDate);
625 }
626 return currentHashCode;
627 }
628
629 public int hashCode() {
630 final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
631 return this.hashCode(null, strategy);
632 }
633
634 }