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