1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29 package fr.ifremer.quadrige3.core.vo.administration.user;
30
31 import java.io.Serializable;
32 import java.sql.Timestamp;
33 import java.util.Arrays;
34 import java.util.Date;
35 import org.apache.commons.lang3.builder.CompareToBuilder;
36 import org.apache.commons.lang3.builder.EqualsBuilder;
37 import org.apache.commons.lang3.builder.HashCodeBuilder;
38 import org.apache.commons.lang3.builder.ToStringBuilder;
39
40
41
42
43 public class QuserVO
44 implements Serializable, Comparable<QuserVO>
45 {
46
47 private static final long serialVersionUID = 4074989181736461905L;
48
49
50
51
52
53 protected Integer quserId;
54
55
56
57
58 protected String quserCd;
59
60
61
62 protected String quserLastNm;
63
64
65
66 protected String quserFirstNm;
67
68
69
70 protected String quserIntranetLg;
71
72
73
74 protected String quserExtranetLg;
75
76
77
78 protected String quserEMail;
79
80
81
82 protected String quserAddress;
83
84
85
86 protected String quserPhone;
87
88
89
90 protected String quserOrgan;
91
92
93
94 protected String quserAdminCenter;
95
96
97
98 protected String quserSite;
99
100
101
102 protected String quserLdapPresent;
103
104
105
106 protected Date quserCreationDt;
107
108
109
110 protected Timestamp updateDt;
111
112
113
114 protected String statusCd;
115
116
117
118 protected Integer depId;
119
120
121
122
123
124 protected DepartmentVO department;
125
126
127 protected PrivilegeVO[] privileges;
128
129
130 public QuserVO()
131 {
132
133 }
134
135
136
137
138
139
140
141
142
143
144 public QuserVO(final Integer quserIdIn, final String quserLastNmIn, final String quserFirstNmIn, final String statusCdIn, final Integer depIdIn, final DepartmentVO departmentIn)
145 {
146 this.quserId = quserIdIn;
147 this.quserLastNm = quserLastNmIn;
148 this.quserFirstNm = quserFirstNmIn;
149 this.statusCd = statusCdIn;
150 this.depId = depIdIn;
151 this.department = departmentIn;
152 }
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176 public QuserVO(final Integer quserIdIn, final String quserCdIn, final String quserLastNmIn, final String quserFirstNmIn, final String quserIntranetLgIn, final String quserExtranetLgIn, final String quserEMailIn, final String quserAddressIn, final String quserPhoneIn, final String quserOrganIn, final String quserAdminCenterIn, final String quserSiteIn, final String quserLdapPresentIn, final Date quserCreationDtIn, final Timestamp updateDtIn, final String statusCdIn, final Integer depIdIn, final DepartmentVO departmentIn, final PrivilegeVO[] privilegesIn)
177 {
178 this.quserId = quserIdIn;
179 this.quserCd = quserCdIn;
180 this.quserLastNm = quserLastNmIn;
181 this.quserFirstNm = quserFirstNmIn;
182 this.quserIntranetLg = quserIntranetLgIn;
183 this.quserExtranetLg = quserExtranetLgIn;
184 this.quserEMail = quserEMailIn;
185 this.quserAddress = quserAddressIn;
186 this.quserPhone = quserPhoneIn;
187 this.quserOrgan = quserOrganIn;
188 this.quserAdminCenter = quserAdminCenterIn;
189 this.quserSite = quserSiteIn;
190 this.quserLdapPresent = quserLdapPresentIn;
191 this.quserCreationDt = quserCreationDtIn;
192 this.updateDt = updateDtIn;
193 this.statusCd = statusCdIn;
194 this.depId = depIdIn;
195 this.department = departmentIn;
196 this.privileges = privilegesIn;
197 }
198
199
200
201
202
203
204
205 public QuserVO(final QuserVO otherBean)
206 {
207 this.quserId = otherBean.getQuserId();
208 this.quserCd = otherBean.getQuserCd();
209 this.quserLastNm = otherBean.getQuserLastNm();
210 this.quserFirstNm = otherBean.getQuserFirstNm();
211 this.quserIntranetLg = otherBean.getQuserIntranetLg();
212 this.quserExtranetLg = otherBean.getQuserExtranetLg();
213 this.quserEMail = otherBean.getQuserEMail();
214 this.quserAddress = otherBean.getQuserAddress();
215 this.quserPhone = otherBean.getQuserPhone();
216 this.quserOrgan = otherBean.getQuserOrgan();
217 this.quserAdminCenter = otherBean.getQuserAdminCenter();
218 this.quserSite = otherBean.getQuserSite();
219 this.quserLdapPresent = otherBean.getQuserLdapPresent();
220 this.quserCreationDt = otherBean.getQuserCreationDt();
221 this.updateDt = otherBean.getUpdateDt();
222 this.statusCd = otherBean.getStatusCd();
223 this.depId = otherBean.getDepId();
224 this.department = otherBean.getDepartment();
225 this.privileges = otherBean.getPrivileges();
226 }
227
228
229
230
231
232 public void copy(final QuserVO otherBean)
233 {
234 if (null != otherBean)
235 {
236 this.setQuserId(otherBean.getQuserId());
237 this.setQuserCd(otherBean.getQuserCd());
238 this.setQuserLastNm(otherBean.getQuserLastNm());
239 this.setQuserFirstNm(otherBean.getQuserFirstNm());
240 this.setQuserIntranetLg(otherBean.getQuserIntranetLg());
241 this.setQuserExtranetLg(otherBean.getQuserExtranetLg());
242 this.setQuserEMail(otherBean.getQuserEMail());
243 this.setQuserAddress(otherBean.getQuserAddress());
244 this.setQuserPhone(otherBean.getQuserPhone());
245 this.setQuserOrgan(otherBean.getQuserOrgan());
246 this.setQuserAdminCenter(otherBean.getQuserAdminCenter());
247 this.setQuserSite(otherBean.getQuserSite());
248 this.setQuserLdapPresent(otherBean.getQuserLdapPresent());
249 this.setQuserCreationDt(otherBean.getQuserCreationDt());
250 this.setUpdateDt(otherBean.getUpdateDt());
251 this.setStatusCd(otherBean.getStatusCd());
252 this.setDepId(otherBean.getDepId());
253 this.setDepartment(otherBean.getDepartment());
254 this.setPrivileges(otherBean.getPrivileges());
255 }
256 }
257
258
259
260
261
262
263 public Integer getQuserId()
264 {
265 return this.quserId;
266 }
267
268
269
270
271
272 public void setQuserId(final Integer value)
273 {
274 this.quserId = value;
275 }
276
277
278
279
280
281
282
283 public String getQuserCd()
284 {
285 return this.quserCd;
286 }
287
288
289
290
291
292
293 public void setQuserCd(final String value)
294 {
295 this.quserCd = value;
296 }
297
298
299
300
301
302
303 public String getQuserLastNm()
304 {
305 return this.quserLastNm;
306 }
307
308
309
310
311
312 public void setQuserLastNm(final String value)
313 {
314 this.quserLastNm = value;
315 }
316
317
318
319
320
321
322 public String getQuserFirstNm()
323 {
324 return this.quserFirstNm;
325 }
326
327
328
329
330
331 public void setQuserFirstNm(final String value)
332 {
333 this.quserFirstNm = value;
334 }
335
336
337
338
339
340
341 public String getQuserIntranetLg()
342 {
343 return this.quserIntranetLg;
344 }
345
346
347
348
349
350 public void setQuserIntranetLg(final String value)
351 {
352 this.quserIntranetLg = value;
353 }
354
355
356
357
358
359
360 public String getQuserExtranetLg()
361 {
362 return this.quserExtranetLg;
363 }
364
365
366
367
368
369 public void setQuserExtranetLg(final String value)
370 {
371 this.quserExtranetLg = value;
372 }
373
374
375
376
377
378
379 public String getQuserEMail()
380 {
381 return this.quserEMail;
382 }
383
384
385
386
387
388 public void setQuserEMail(final String value)
389 {
390 this.quserEMail = value;
391 }
392
393
394
395
396
397
398 public String getQuserAddress()
399 {
400 return this.quserAddress;
401 }
402
403
404
405
406
407 public void setQuserAddress(final String value)
408 {
409 this.quserAddress = value;
410 }
411
412
413
414
415
416
417 public String getQuserPhone()
418 {
419 return this.quserPhone;
420 }
421
422
423
424
425
426 public void setQuserPhone(final String value)
427 {
428 this.quserPhone = value;
429 }
430
431
432
433
434
435
436 public String getQuserOrgan()
437 {
438 return this.quserOrgan;
439 }
440
441
442
443
444
445 public void setQuserOrgan(final String value)
446 {
447 this.quserOrgan = value;
448 }
449
450
451
452
453
454
455 public String getQuserAdminCenter()
456 {
457 return this.quserAdminCenter;
458 }
459
460
461
462
463
464 public void setQuserAdminCenter(final String value)
465 {
466 this.quserAdminCenter = value;
467 }
468
469
470
471
472
473
474 public String getQuserSite()
475 {
476 return this.quserSite;
477 }
478
479
480
481
482
483 public void setQuserSite(final String value)
484 {
485 this.quserSite = value;
486 }
487
488
489
490
491
492
493 public String getQuserLdapPresent()
494 {
495 return this.quserLdapPresent;
496 }
497
498
499
500
501
502 public void setQuserLdapPresent(final String value)
503 {
504 this.quserLdapPresent = value;
505 }
506
507
508
509
510
511
512 public Date getQuserCreationDt()
513 {
514 return this.quserCreationDt;
515 }
516
517
518
519
520
521 public void setQuserCreationDt(final Date value)
522 {
523 this.quserCreationDt = value;
524 }
525
526
527
528
529
530
531 public Timestamp getUpdateDt()
532 {
533 return this.updateDt;
534 }
535
536
537
538
539
540 public void setUpdateDt(final Timestamp value)
541 {
542 this.updateDt = value;
543 }
544
545
546
547
548
549
550 public String getStatusCd()
551 {
552 return this.statusCd;
553 }
554
555
556
557
558
559 public void setStatusCd(final String value)
560 {
561 this.statusCd = value;
562 }
563
564
565
566
567
568
569 public Integer getDepId()
570 {
571 return this.depId;
572 }
573
574
575
576
577
578 public void setDepId(final Integer value)
579 {
580 this.depId = value;
581 }
582
583
584
585
586
587
588 public DepartmentVO getDepartment()
589 {
590 return this.department;
591 }
592
593
594
595
596
597 public void setDepartment(DepartmentVO value)
598 {
599 this.department = value;
600 }
601
602
603
604
605
606
607
608
609
610 public PrivilegeVO[] getPrivileges()
611 {
612 return this.privileges;
613 }
614
615
616
617
618
619 public void setPrivileges(PrivilegeVO[] value)
620 {
621 this.privileges = value;
622 }
623
624
625
626
627
628
629 @Override
630 public boolean equals(final Object object)
631 {
632 if (object==null || object.getClass() != this.getClass())
633 {
634 return false;
635 }
636
637 if (object==this)
638 {
639 return true;
640 }
641 QuserVO rhs = (QuserVO) object;
642 return new EqualsBuilder()
643 .append(this.getQuserId(), rhs.getQuserId())
644 .append(this.getQuserCd(), rhs.getQuserCd())
645 .append(this.getQuserLastNm(), rhs.getQuserLastNm())
646 .append(this.getQuserFirstNm(), rhs.getQuserFirstNm())
647 .append(this.getQuserIntranetLg(), rhs.getQuserIntranetLg())
648 .append(this.getQuserExtranetLg(), rhs.getQuserExtranetLg())
649 .append(this.getQuserEMail(), rhs.getQuserEMail())
650 .append(this.getQuserAddress(), rhs.getQuserAddress())
651 .append(this.getQuserPhone(), rhs.getQuserPhone())
652 .append(this.getQuserOrgan(), rhs.getQuserOrgan())
653 .append(this.getQuserAdminCenter(), rhs.getQuserAdminCenter())
654 .append(this.getQuserSite(), rhs.getQuserSite())
655 .append(this.getQuserLdapPresent(), rhs.getQuserLdapPresent())
656 .append(this.getQuserCreationDt(), rhs.getQuserCreationDt())
657 .append(this.getUpdateDt(), rhs.getUpdateDt())
658 .append(this.getStatusCd(), rhs.getStatusCd())
659 .append(this.getDepId(), rhs.getDepId())
660 .append(this.getDepartment(), rhs.getDepartment())
661 .append(this.getPrivileges(), rhs.getPrivileges())
662 .isEquals();
663 }
664
665
666
667
668
669
670 public int compareTo(final QuserVO object)
671 {
672 if (object==null)
673 {
674 return -1;
675 }
676
677 if (object==this)
678 {
679 return 0;
680 }
681 return new CompareToBuilder()
682 .append(this.getQuserId(), object.getQuserId())
683 .append(this.getQuserCd(), object.getQuserCd())
684 .append(this.getQuserLastNm(), object.getQuserLastNm())
685 .append(this.getQuserFirstNm(), object.getQuserFirstNm())
686 .append(this.getQuserIntranetLg(), object.getQuserIntranetLg())
687 .append(this.getQuserExtranetLg(), object.getQuserExtranetLg())
688 .append(this.getQuserEMail(), object.getQuserEMail())
689 .append(this.getQuserAddress(), object.getQuserAddress())
690 .append(this.getQuserPhone(), object.getQuserPhone())
691 .append(this.getQuserOrgan(), object.getQuserOrgan())
692 .append(this.getQuserAdminCenter(), object.getQuserAdminCenter())
693 .append(this.getQuserSite(), object.getQuserSite())
694 .append(this.getQuserLdapPresent(), object.getQuserLdapPresent())
695 .append(this.getQuserCreationDt(), object.getQuserCreationDt())
696 .append(this.getUpdateDt(), object.getUpdateDt())
697 .append(this.getStatusCd(), object.getStatusCd())
698 .append(this.getDepId(), object.getDepId())
699 .append(this.getDepartment(), object.getDepartment())
700 .append(this.getPrivileges(), object.getPrivileges())
701 .toComparison();
702 }
703
704
705
706
707
708 @Override
709 public int hashCode()
710 {
711 return new HashCodeBuilder(1249046965, -82296885)
712 .append(this.getQuserId())
713 .append(this.getQuserCd())
714 .append(this.getQuserLastNm())
715 .append(this.getQuserFirstNm())
716 .append(this.getQuserIntranetLg())
717 .append(this.getQuserExtranetLg())
718 .append(this.getQuserEMail())
719 .append(this.getQuserAddress())
720 .append(this.getQuserPhone())
721 .append(this.getQuserOrgan())
722 .append(this.getQuserAdminCenter())
723 .append(this.getQuserSite())
724 .append(this.getQuserLdapPresent())
725 .append(this.getQuserCreationDt())
726 .append(this.getUpdateDt())
727 .append(this.getStatusCd())
728 .append(this.getDepId())
729 .append(this.getDepartment())
730 .append(this.getPrivileges())
731 .toHashCode();
732 }
733
734
735
736
737
738 @Override
739 public String toString()
740 {
741 return new ToStringBuilder(this)
742 .append("quserId", this.getQuserId())
743 .append("quserCd", this.getQuserCd())
744 .append("quserLastNm", this.getQuserLastNm())
745 .append("quserFirstNm", this.getQuserFirstNm())
746 .append("quserIntranetLg", this.getQuserIntranetLg())
747 .append("quserExtranetLg", this.getQuserExtranetLg())
748 .append("quserEMail", this.getQuserEMail())
749 .append("quserAddress", this.getQuserAddress())
750 .append("quserPhone", this.getQuserPhone())
751 .append("quserOrgan", this.getQuserOrgan())
752 .append("quserAdminCenter", this.getQuserAdminCenter())
753 .append("quserSite", this.getQuserSite())
754 .append("quserLdapPresent", this.getQuserLdapPresent())
755 .append("quserCreationDt", this.getQuserCreationDt())
756 .append("updateDt", this.getUpdateDt())
757 .append("statusCd", this.getStatusCd())
758 .append("depId", this.getDepId())
759 .append("department", this.getDepartment())
760 .append("privileges", this.getPrivileges())
761 .toString();
762 }
763
764
765
766
767
768
769
770
771
772
773
774
775
776 protected static boolean equal(final Object first, final Object second)
777 {
778 final boolean equal;
779
780 if (first == null)
781 {
782 equal = (second == null);
783 }
784 else if (first.getClass().isArray() && (second != null) && second.getClass().isArray())
785 {
786 equal = Arrays.equals((Object[])first, (Object[])second);
787 }
788 else
789 {
790 equal = first.equals(second);
791 }
792
793 return equal;
794 }
795
796
797 }