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