Fixed health check issue
[portal.git] / portal-BE / src / main / java / org / onap / portal / domain / db / fn / FnUser.java
1 /*
2  * ============LICENSE_START==========================================
3  * ONAP Portal
4  * ===================================================================
5  * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
6  * ===================================================================
7  * Modifications Copyright (c) 2019 Samsung
8  * ===================================================================
9  *
10  * Unless otherwise specified, all software contained herein is licensed
11  * under the Apache License, Version 2.0 (the "License");
12  * you may not use this software except in compliance with the License.
13  * You may obtain a copy of the License at
14  *
15  *             http://www.apache.org/licenses/LICENSE-2.0
16  *
17  * Unless required by applicable law or agreed to in writing, software
18  * distributed under the License is distributed on an "AS IS" BASIS,
19  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20  * See the License for the specific language governing permissions and
21  * limitations under the License.
22  *
23  * Unless otherwise specified, all documentation contained herein is licensed
24  * under the Creative Commons License, Attribution 4.0 Intl. (the "License");
25  * you may not use this documentation except in compliance with the License.
26  * You may obtain a copy of the License at
27  *
28  *             https://creativecommons.org/licenses/by/4.0/
29  *
30  * Unless required by applicable law or agreed to in writing, documentation
31  * distributed under the License is distributed on an "AS IS" BASIS,
32  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
33  * See the License for the specific language governing permissions and
34  * limitations under the License.
35  *
36  * ============LICENSE_END============================================
37  *
38  *
39  */
40
41 package org.onap.portal.domain.db.fn;
42
43 import java.io.Serializable;
44 import java.time.LocalDateTime;
45 import java.util.Collection;
46 import java.util.HashSet;
47 import java.util.Iterator;
48 import java.util.Set;
49 import java.util.SortedSet;
50 import java.util.TreeSet;
51 import java.util.stream.Collectors;
52 import javax.persistence.CascadeType;
53 import javax.persistence.Column;
54 import javax.persistence.Entity;
55 import javax.persistence.FetchType;
56 import javax.persistence.Index;
57 import javax.persistence.JoinColumn;
58 import javax.persistence.ManyToMany;
59 import javax.persistence.ManyToOne;
60 import javax.persistence.NamedQueries;
61 import javax.persistence.NamedQuery;
62 import javax.persistence.OneToMany;
63 import javax.persistence.Table;
64 import javax.persistence.UniqueConstraint;
65 import javax.validation.constraints.Digits;
66 import javax.validation.constraints.Email;
67 import javax.validation.constraints.NotNull;
68 import javax.validation.constraints.PastOrPresent;
69 import javax.validation.constraints.Size;
70 import lombok.AllArgsConstructor;
71 import lombok.Builder;
72 import lombok.Getter;
73 import lombok.NoArgsConstructor;
74 import lombok.Setter;
75 import org.hibernate.annotations.DynamicUpdate;
76 import org.hibernate.validator.constraints.SafeHtml;
77 import org.onap.portal.domain.db.DomainVo;
78 import org.onap.portal.domain.db.cr.CrReportFileHistory;
79 import org.onap.portal.domain.db.ep.EpPersUserWidgetPlacement;
80 import org.onap.portal.domain.db.ep.EpPersUserWidgetSel;
81 import org.onap.portal.domain.db.ep.EpUserNotification;
82 import org.onap.portal.domain.db.ep.EpUserRolesRequest;
83 import org.onap.portal.domain.db.ep.EpWidgetCatalogParameter;
84 import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
85 import org.springframework.security.core.GrantedAuthority;
86 import org.springframework.security.core.authority.SimpleGrantedAuthority;
87 import org.springframework.security.core.userdetails.UserDetails;
88
89 /*
90 CREATE TABLE `fn_user` (
91         `user_id` int(11) NOT NULL AUTO_INCREMENT,
92         `org_id` int(11) DEFAULT NULL,
93         `manager_id` int(11) DEFAULT NULL,
94         `first_name` varchar(50) DEFAULT NULL,
95         `middle_name` varchar(50) DEFAULT NULL,
96         `last_name` varchar(50) DEFAULT NULL,
97         `phone` varchar(25) DEFAULT NULL,
98         `fax` varchar(25) DEFAULT NULL,
99         `cellular` varchar(25) DEFAULT NULL,
100         `email` varchar(50) DEFAULT NULL,
101         `address_id` decimal(11,0) DEFAULT NULL,
102         `alert_method_cd` varchar(10) DEFAULT NULL,
103         `hrid` varchar(20) DEFAULT NULL,
104         `org_user_id` varchar(20) DEFAULT NULL,
105         `org_code` varchar(30) DEFAULT NULL,
106         `login_id` varchar(25) DEFAULT NULL,
107         `login_pwd` varchar(100) DEFAULT NULL,
108         `last_login_date` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
109         `active_yn` varchar(1) NOT NULL DEFAULT 'y',
110         `created_id` int(11) DEFAULT NULL,
111         `created_date` timestamp NOT NULL DEFAULT current_timestamp(),
112         `modified_id` int(11) DEFAULT NULL,
113         `modified_date` timestamp NOT NULL DEFAULT current_timestamp(),
114         `is_internal_yn` char(1) NOT NULL DEFAULT 'n',
115         `address_line_1` varchar(100) DEFAULT NULL,
116         `address_line_2` varchar(100) DEFAULT NULL,
117         `city` varchar(50) DEFAULT NULL,
118         `state_cd` varchar(3) DEFAULT NULL,
119         `zip_code` varchar(11) DEFAULT NULL,
120         `country_cd` varchar(3) DEFAULT NULL,
121         `location_clli` varchar(8) DEFAULT NULL,
122         `org_manager_userid` varchar(20) DEFAULT NULL,
123         `company` varchar(100) DEFAULT NULL,
124         `department_name` varchar(100) DEFAULT NULL,
125         `job_title` varchar(100) DEFAULT NULL,
126         `timezone` int(11) DEFAULT NULL,
127         `department` varchar(25) DEFAULT NULL,
128         `business_unit` varchar(25) DEFAULT NULL,
129         `business_unit_name` varchar(100) DEFAULT NULL,
130         `cost_center` varchar(25) DEFAULT NULL,
131         `fin_loc_code` varchar(10) DEFAULT NULL,
132         `silo_status` varchar(10) DEFAULT NULL,
133         `language_id` int(2) NOT NULL DEFAULT 1,
134         PRIMARY KEY (`user_id`),
135         UNIQUE KEY `fn_user_hrid` (`hrid`) USING BTREE,
136         UNIQUE KEY `fn_user_login_id` (`login_id`) USING BTREE,
137         KEY `fn_user_address_id` (`address_id`) USING BTREE,
138         KEY `fn_user_alert_method_cd` (`alert_method_cd`) USING BTREE,
139         KEY `fn_user_org_id` (`org_id`) USING BTREE,
140         KEY `fk_fn_user_ref_197_fn_user` (`manager_id`),
141         KEY `fk_fn_user_ref_198_fn_user` (`created_id`),
142         KEY `fk_fn_user_ref_199_fn_user` (`modified_id`),
143         KEY `fk_timezone` (`timezone`),
144         CONSTRAINT `fk_fn_user_ref_110_fn_org` FOREIGN KEY (`org_id`) REFERENCES `fn_org` (`org_id`),
145         CONSTRAINT `fk_fn_user_ref_123_fn_lu_al` FOREIGN KEY (`alert_method_cd`) REFERENCES `fn_lu_alert_method` (`alert_method_cd`),
146         CONSTRAINT `fk_fn_user_ref_197_fn_user` FOREIGN KEY (`manager_id`) REFERENCES `fn_user` (`user_id`),
147         CONSTRAINT `fk_fn_user_ref_198_fn_user` FOREIGN KEY (`created_id`) REFERENCES `fn_user` (`user_id`),
148         CONSTRAINT `fk_fn_user_ref_199_fn_user` FOREIGN KEY (`modified_id`) REFERENCES `fn_user` (`user_id`),
149         CONSTRAINT `fk_timezone` FOREIGN KEY (`timezone`) REFERENCES `fn_lu_timezone` (`timezone_id`)
150         )
151 */
152
153 @NamedQueries({
154     @NamedQuery(
155         name = "FnUser.getUserWithOrgUserId",
156         query = "FROM FnUser WHERE orgUserId = :orgId"),
157     @NamedQuery(
158         name = "FnUser.findByLoginId",
159         query = "FROM FnUser WHERE loginId = :loginId"),
160     @NamedQuery(
161         name = "FnUser.getActiveUsers",
162         query = "FROM FnUser WHERE activeYn = 'Y'"),
163     @NamedQuery(
164         name = "FnUser.getUsersByOrgIds",
165         query = "FROM FnUser WHERE orgUserId IN :orgIds"),
166     @NamedQuery(
167         name = "FnUSer.findByFirstNameAndLastName",
168         query = "FROM FnUser WHERE firstName = :firstName AND  lastName = :lastName"
169     )
170 })
171
172 @Table(name = "fn_user", indexes = {
173     @Index(name = "fn_user_address_id", columnList = "address_id"),
174     @Index(name = "fn_user_alert_method_cd", columnList = "alert_method_cd"),
175     @Index(name = "fn_user_org_id", columnList = "org_id"),
176 //    @Index(name = "fk_fn_user_ref_197_fn_user", columnList = "manager_id"),
177     @Index(name = "fk_fn_user_ref_198_fn_user", columnList = "created_id"),
178     @Index(name = "fk_fn_user_ref_199_fn_user", columnList = "modified_id"),
179     @Index(name = "fk_timezone", columnList = "timezone")
180 },
181     uniqueConstraints = {
182         @UniqueConstraint(name = "fn_user_hrid", columnNames = "hrid"),
183         @UniqueConstraint(name = "fn_user_login_id", columnNames = "login_id")
184
185     })
186
187 @Getter
188 @Setter
189 @Entity
190 @NoArgsConstructor
191 @AllArgsConstructor
192 @DynamicUpdate
193 public class FnUser extends DomainVo implements UserDetails, Serializable {
194
195   private static EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(FnUser.class);
196
197 /*  @ManyToOne(cascade = CascadeType.MERGE, fetch = FetchType.LAZY)
198   @JoinColumn(name = "manager_id")
199   private FnUser managerId;*/
200   @ManyToOne(cascade = CascadeType.MERGE, fetch = FetchType.LAZY)
201   @JoinColumn(name = "org_id")
202   private FnOrg orgId;
203   @Column(name = "first_name", length = 50)
204   @Size(max = 50)
205   @SafeHtml
206   private String firstName;
207   @Column(name = "middle_name", length = 50)
208   @Size(max = 50)
209   @SafeHtml
210   private String middleName;
211   @Column(name = "last_name", length = 50)
212   @Size(max = 50)
213   @SafeHtml
214   private String lastName;
215   @Column(name = "phone", length = 25)
216   @Size(max = 25)
217   @SafeHtml
218   private String phone;
219   @Column(name = "fax", length = 25)
220   @Size(max = 25)
221   @SafeHtml
222   private String fax;
223   @Column(name = "cellular", length = 25)
224   @Size(max = 25)
225   @SafeHtml
226   private String cellular;
227   @Column(name = "email", length = 50)
228   @Size(max = 50)
229   @Email
230   @SafeHtml
231   private String email;
232   @Column(name = "address_id")
233   @Digits(integer = 11, fraction = 0)
234   private Long addressId;
235   @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.MERGE)
236   @JoinColumn(name = "alert_method_cd")
237   private FnLuAlertMethod alertMethodCd;
238   @Column(name = "hrid", length = 20)
239   @Size(max = 20)
240   @SafeHtml
241   private String hrid;
242   @Column(name = "org_user_id", length = 20)
243   @Size(max = 20)
244   @SafeHtml
245   private String orgUserId;
246   @Column(name = "org_code", length = 30)
247   @Size(max = 30)
248   @SafeHtml
249   private String orgCode;
250   @Column(name = "login_id", length = 25)
251   @Size(max = 25)
252   @SafeHtml
253   private String loginId;
254   @Column(name = "login_pwd", length = 100)
255   @Size(max = 100)
256   @SafeHtml
257   private String loginPwd;
258   @Column(name = "last_login_date", nullable = false, columnDefinition = "datetime DEFAULT current_timestamp() ON UPDATE current_timestamp()")
259   @PastOrPresent
260   protected LocalDateTime lastLoginDate;
261   @Column(name = "active_yn", nullable = false)
262   private Boolean activeYn;
263   @Column(name = "created_date", columnDefinition = "datetime DEFAULT current_timestamp()", nullable = false)
264   @PastOrPresent
265   protected LocalDateTime createdDate;
266   @Column(name = "modified_date", nullable = false, columnDefinition = "datetime default now()")
267   @PastOrPresent
268   protected LocalDateTime modifiedDate;
269   @Column(name = "is_internal_yn", nullable = false, columnDefinition = "boolean DEFAULT false")
270   private Boolean isInternalYn = false;
271   @Column(name = "is_system_user", nullable = false, columnDefinition = "boolean DEFAULT false")
272   private Boolean isSystemUser = false;
273   @Column(name = "address_line_1", length = 100)
274   @Size(max = 100)
275   @SafeHtml
276   private String addressLine1;
277   @Column(name = "address_line_2", length = 100)
278   @Size(max = 100)
279   @SafeHtml
280   private String addressLine2;
281   @Column(name = "city", length = 50)
282   @Size(max = 50)
283   @SafeHtml
284   private String city;
285   @Column(name = "state_cd", length = 3)
286   @Size(max = 3)
287   @SafeHtml
288   private String stateCd;
289   @Column(name = "zip_code", length = 11)
290   @Size(max = 11)
291   @SafeHtml
292   private String zipCode;
293   @Column(name = "country_cd", length = 3)
294   @Size(max = 3)
295   @SafeHtml
296   private String countryCd;
297   @Column(name = "location_clli", length = 8)
298   @Size(max = 8)
299   @SafeHtml
300   private String locationClli;
301   @Column(name = "org_manager_userid", length = 20)
302   private Long orgManagerUserId;
303   @Column(name = "company", length = 100)
304   @Size(max = 100)
305   @SafeHtml
306   private String company;
307   @Column(name = "department_name", length = 200)
308   @Size(max = 200)
309   @SafeHtml
310   private String departmentName;
311   @Column(name = "job_title", length = 100)
312   @Size(max = 100)
313   @SafeHtml
314   private String jobTitle;
315   @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.MERGE)
316   @JoinColumn(name = "timezone")
317   private FnLuTimezone timezone;
318   @Column(name = "department", length = 25)
319   @Size(max = 25)
320   @SafeHtml
321   private String department;
322   @Column(name = "business_unit", length = 25)
323   @Size(max = 25)
324   @SafeHtml
325   private String businessUnit;
326   @Column(name = "business_unit_name", length = 100)
327   @Size(max = 100)
328   @SafeHtml
329   private String businessUnitName;
330   @Column(name = "cost_center", length = 25)
331   @Size(max = 25)
332   @SafeHtml
333   private String costCenter;
334   @Column(name = "fin_loc_code", length = 10)
335   @Size(max = 10)
336   @SafeHtml
337   private String finLocCode;
338   @Column(name = "silo_status", length = 10)
339   @Size(max = 10)
340   @SafeHtml
341   private String siloStatus;
342   @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.MERGE)
343   @JoinColumn(name = "language_id", nullable = false)
344   @NotNull(message = "languageId must not be null")
345   private FnLanguage languageId;
346   @Column(name = "is_guest", nullable = false, columnDefinition = "boolean DEFAULT false")
347   @NotNull(message = "guest must not be null")
348   private Boolean guest = false;
349   @ManyToMany(cascade = CascadeType.MERGE, fetch = FetchType.LAZY, mappedBy = "fnUserList")
350   private Set<CrReportFileHistory> crReportFileHistorie;
351   @ManyToMany(cascade = CascadeType.MERGE, fetch = FetchType.EAGER, mappedBy = "fnUsers")
352   private Set<FnRole> fnRoles;
353   @ManyToMany(cascade = CascadeType.MERGE, fetch = FetchType.LAZY)
354   private Set<FnMenuFunctional> fnRoleList;
355   @OneToMany(
356       targetEntity = FnAuditLog.class,
357       mappedBy = "userId",
358       cascade = CascadeType.MERGE,
359       fetch = FetchType.LAZY
360   )
361   private Set<FnAuditLog> fnAuditLogs;
362   @OneToMany(
363       targetEntity = EpUserRolesRequest.class,
364       mappedBy = "userId",
365       cascade = CascadeType.MERGE,
366       fetch = FetchType.LAZY
367   )
368   private Set<EpUserRolesRequest> epUserRolesRequests;
369   @OneToMany(
370       targetEntity = FnPersUserAppSel.class,
371       mappedBy = "userId",
372       cascade = CascadeType.MERGE,
373       fetch = FetchType.LAZY
374   )
375   private Set<FnPersUserAppSel> persUserAppSels;
376   @OneToMany(
377       targetEntity = EpWidgetCatalogParameter.class,
378       mappedBy = "userId",
379       cascade = CascadeType.MERGE,
380       fetch = FetchType.LAZY
381   )
382   private Set<EpWidgetCatalogParameter> epWidgetCatalogParameters;
383   @OneToMany(
384       targetEntity = EpPersUserWidgetPlacement.class,
385       mappedBy = "userId",
386       cascade = CascadeType.MERGE,
387       fetch = FetchType.LAZY
388   )
389   private Set<EpPersUserWidgetPlacement> epPersUserWidgetPlacements;
390   @OneToMany(
391       targetEntity = EpPersUserWidgetSel.class,
392       mappedBy = "userId",
393       cascade = CascadeType.MERGE,
394       fetch = FetchType.LAZY
395   )
396   private Set<EpPersUserWidgetSel> epPersUserWidgetSels;
397   @OneToMany(
398       targetEntity = FnUserRole.class,
399       mappedBy = "userId",
400       cascade = CascadeType.MERGE,
401       fetch = FetchType.LAZY
402   )
403   private Set<FnUserRole> userApps;
404   @OneToMany(
405       targetEntity = EpUserNotification.class,
406       mappedBy = "userId",
407       cascade = CascadeType.MERGE,
408       fetch = FetchType.LAZY
409   )
410   private Set<EpUserNotification> epUserNotifications;
411 /*  @OneToMany(
412       targetEntity = FnUser.class,
413       mappedBy = "managerId",
414       cascade = CascadeType.MERGE,
415       fetch = FetchType.LAZY
416   )
417   private Set<FnUser> fnUsersManagerId;*/
418
419   @Override
420   public Collection<? extends GrantedAuthority> getAuthorities() {
421     return fnRoles
422         .stream()
423         .map(fnRole -> new SimpleGrantedAuthority("ROLE_" + fnRole.getRoleName()))
424         .collect(Collectors.toList());
425   }
426
427   @Override
428   public String getPassword() {
429     return this.getLoginPwd();
430   }
431
432   @Override
433   public String getUsername() {
434     return this.getLoginId();
435   }
436
437   @Override
438   public boolean isAccountNonExpired() {
439     return true;
440   }
441
442   @Override
443   public boolean isAccountNonLocked() {
444     return true;
445   }
446
447   @Override
448   public boolean isCredentialsNonExpired() {
449     return true;
450   }
451
452   @Override
453   public boolean isEnabled() {
454     return true;
455   }
456
457   public String getFullName() {
458     return this.firstName + " " + this.lastName;
459   }
460
461   public SortedSet<FnRole> getAppEPRoles(FnApp app) {
462
463     logger.debug(EELFLoggerDelegate.debugLogger, "In EPUser.getAppEPRoles() - app = {}", app.getAppName());
464
465     SortedSet<FnRole> roles = new TreeSet<>();
466     Set<FnUserRole> userAppRoles = getUserApps();
467
468     logger.debug(EELFLoggerDelegate.debugLogger, "In EPUser.getAppEPRoles() - userApps = {} ", userAppRoles.size());
469
470     Iterator<FnUserRole> userAppRolesIterator = userAppRoles.iterator();
471
472     FnUserRole userAppRole;
473     // getting default app
474     while (userAppRolesIterator.hasNext()) {
475       FnUserRole tempUserApp = userAppRolesIterator.next();
476       if (tempUserApp.getFnAppId().getId().equals(app.getId())) {
477
478         logger.debug(EELFLoggerDelegate.debugLogger,
479             "In EPUser.getAppEPRoles() - for user {}, found application {}", this.getFullName(),
480             app.getAppName());
481
482         userAppRole = tempUserApp;
483
484         FnRole role = userAppRole.getRoleId();
485         if (role.getActiveYn()) {
486           logger.debug(EELFLoggerDelegate.debugLogger,
487               "In EPUser.getAppEPRoles() - Role {} is active - adding for user {} and app {}",
488               role.getRoleName(), this.getFullName(), app.getAppName());
489           roles.add(role);
490         } else {
491           logger.debug(EELFLoggerDelegate.debugLogger,
492               "In EPUser.getAppEPRoles() - Role {} is NOT active - NOT adding for user {} and app {}",
493               role.getRoleName(), this.getFullName(), app.getAppName());
494         }
495       }
496     }
497     logger.debug(EELFLoggerDelegate.debugLogger, "In EPUser.getAppEPRoles() - roles = {}", roles.size());
498
499     return roles;
500   }
501
502   public void setRoles(Set<FnRole> roles) {
503     FnApp app = new FnApp();
504     app.setId(1L);
505     app.setAppName("Default");
506     this.addAppRoles(app, roles);
507   }
508
509   private void addAppRoles(FnApp app, Set<FnRole> roles) {
510     if (roles != null) {
511       Set<FnUserRole> newUserApps = new HashSet<>();
512       for (FnRole role : roles) {
513         FnUserRole userApp = new FnUserRole();
514         userApp.setUserId(this);
515         userApp.setFnAppId(app);
516         userApp.setRoleId(role);
517         newUserApps.add(userApp);
518       }
519
520       this.setUserApps(newUserApps);
521     } else {
522       this.userApps.clear();
523     }
524   }
525
526   @Builder
527   public FnUser(@Digits(integer = 11, fraction = 0) Long id, LocalDateTime created, LocalDateTime modified,
528       Long rowNum, Serializable auditUserId, DomainVo createdId, DomainVo modifiedId,
529       Set<DomainVo> fnUsersCreatedId, Set<DomainVo> fnUsersModifiedId, FnOrg orgId,
530       @Size(max = 50) @SafeHtml String firstName,
531       @Size(max = 50) @SafeHtml String middleName,
532       @Size(max = 50) @SafeHtml String lastName,
533       @Size(max = 25) @SafeHtml String phone,
534       @Size(max = 25) @SafeHtml String fax,
535       @Size(max = 25) @SafeHtml String cellular,
536       @Size(max = 50) @Email @SafeHtml String email,
537       @Digits(integer = 11, fraction = 0) Long addressId, FnLuAlertMethod alertMethodCd,
538       @Size(max = 20) @SafeHtml String hrid,
539       @Size(max = 20) @SafeHtml String orgUserId,
540       @Size(max = 30) @SafeHtml String org_code,
541       @Size(max = 25) @SafeHtml String loginId,
542       @Size(max = 100) @SafeHtml String loginPwd,
543       @PastOrPresent LocalDateTime lastLoginDate, Boolean activeYn,
544       @PastOrPresent LocalDateTime createdDate,
545       @PastOrPresent LocalDateTime modifiedDate, Boolean isInternalYn, Boolean isSystemUser,
546       @Size(max = 100) @SafeHtml String addressLine1,
547       @Size(max = 100) @SafeHtml String addressLine2,
548       @Size(max = 50) @SafeHtml String city,
549       @Size(max = 3) @SafeHtml String stateCd,
550       @Size(max = 11) @SafeHtml String zipCode,
551       @Size(max = 3) @SafeHtml String countryCd,
552       @Size(max = 8) @SafeHtml String locationClli,
553       Long orgManagerUserId,
554       @Size(max = 100) @SafeHtml String company,
555       @Size(max = 200) @SafeHtml String departmentName,
556       @Size(max = 100) @SafeHtml String jobTitle, FnLuTimezone timezone,
557       @Size(max = 25) @SafeHtml String department,
558       @Size(max = 25) @SafeHtml String businessUnit,
559       @Size(max = 100) @SafeHtml String businessUnitName,
560       @Size(max = 25) @SafeHtml String cost_center,
561       @Size(max = 10) @SafeHtml String finLocCode,
562       @Size(max = 10) @SafeHtml String siloStatus,
563       @NotNull(message = "languageId must not be null") FnLanguage languageId,
564       @NotNull(message = "guest must not be null") Boolean guest,
565       Set<CrReportFileHistory> crReportFileHistorie, Set<FnRole> fnRoles,
566       Set<FnMenuFunctional> fnRoleList, Set<FnAuditLog> fnAuditLogs,
567       Set<EpUserRolesRequest> epUserRolesRequests,
568       Set<FnPersUserAppSel> persUserAppSels,
569       Set<EpWidgetCatalogParameter> epWidgetCatalogParameters,
570       Set<EpPersUserWidgetPlacement> epPersUserWidgetPlacements,
571       Set<EpPersUserWidgetSel> epPersUserWidgetSels, Set<FnUserRole> userApps,
572       Set<EpUserNotification> epUserNotifications) {
573     super(id, created, modified, rowNum, auditUserId, createdId, modifiedId, fnUsersCreatedId, fnUsersModifiedId);
574     this.orgId = orgId;
575     this.firstName = firstName;
576     this.middleName = middleName;
577     this.lastName = lastName;
578     this.phone = phone;
579     this.fax = fax;
580     this.cellular = cellular;
581     this.email = email;
582     this.addressId = addressId;
583     this.alertMethodCd = alertMethodCd;
584     this.hrid = hrid;
585     this.orgUserId = orgUserId;
586     this.orgCode = org_code;
587     this.loginId = loginId;
588     this.loginPwd = loginPwd;
589     this.lastLoginDate = lastLoginDate;
590     this.activeYn = activeYn;
591     this.createdDate = createdDate;
592     this.modifiedDate = modifiedDate;
593     this.isInternalYn = isInternalYn;
594     this.isSystemUser = isSystemUser;
595     this.addressLine1 = addressLine1;
596     this.addressLine2 = addressLine2;
597     this.city = city;
598     this.stateCd = stateCd;
599     this.zipCode = zipCode;
600     this.countryCd = countryCd;
601     this.locationClli = locationClli;
602     this.orgManagerUserId = orgManagerUserId;
603     this.company = company;
604     this.departmentName = departmentName;
605     this.jobTitle = jobTitle;
606     this.timezone = timezone;
607     this.department = department;
608     this.businessUnit = businessUnit;
609     this.businessUnitName = businessUnitName;
610     this.costCenter = cost_center;
611     this.finLocCode = finLocCode;
612     this.siloStatus = siloStatus;
613     this.languageId = languageId;
614     this.guest = guest;
615     this.crReportFileHistorie = crReportFileHistorie;
616     this.fnRoles = fnRoles;
617     this.fnRoleList = fnRoleList;
618     this.fnAuditLogs = fnAuditLogs;
619     this.epUserRolesRequests = epUserRolesRequests;
620     this.persUserAppSels = persUserAppSels;
621     this.epWidgetCatalogParameters = epWidgetCatalogParameters;
622     this.epPersUserWidgetPlacements = epPersUserWidgetPlacements;
623     this.epPersUserWidgetSels = epPersUserWidgetSels;
624     this.userApps = userApps;
625     this.epUserNotifications = epUserNotifications;
626   }
627 }