Null check for ClientResponse in PolicyUril.java
[portal.git] / ecomp-portal-BE-common / src / main / java / org / openecomp / portalapp / portal / transport / CentralUser.java
1 /*-
2  * ============LICENSE_START==========================================
3  * ONAP Portal
4  * ===================================================================
5  * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
6  * ===================================================================
7  *
8  * Unless otherwise specified, all software contained herein is licensed
9  * under the Apache License, Version 2.0 (the “License”);
10  * you may not use this software except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  *             http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  *
21  * Unless otherwise specified, all documentation contained herein is licensed
22  * under the Creative Commons License, Attribution 4.0 Intl. (the “License”);
23  * you may not use this documentation except in compliance with the License.
24  * You may obtain a copy of the License at
25  *
26  *             https://creativecommons.org/licenses/by/4.0/
27  *
28  * Unless required by applicable law or agreed to in writing, documentation
29  * distributed under the License is distributed on an "AS IS" BASIS,
30  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31  * See the License for the specific language governing permissions and
32  * limitations under the License.
33  *
34  * ============LICENSE_END============================================
35  *
36  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
37  */
38 package org.openecomp.portalapp.portal.transport;
39
40 import java.util.Date;
41 import java.util.Set;
42
43 public class CentralUser {
44
45         public Long id;
46         public Date created;
47         public Date modified;
48         public Long createdId;
49         public Long modifiedId;
50         public Long rowNum;
51
52         public Long orgId;
53         public Long managerId;
54         public String firstName;
55         public String middleInitial;
56         public String lastName;
57         public String phone;
58         public String fax;
59         public String cellular;
60         public String email;
61         public Long addressId;
62         public String alertMethodCd;
63         public String hrid;
64         public String orgUserId;
65         public String orgCode;
66         public String address1;
67         public String address2;
68         public String city;
69         public String state;
70         public String zipCode;
71         public String country;
72         public String orgManagerUserId;
73         public String locationClli;
74         public String businessCountryCode;
75         public String businessCountryName;
76         public String businessUnit;
77         public String businessUnitName;
78         public String department;
79         public String departmentName;
80         public String companyCode;
81         public String company;
82         public String zipCodeSuffix;
83         public String jobTitle;
84         public String commandChain;
85         public String siloStatus;
86         public String costCenter;
87         public String financialLocCode;
88
89         public String loginId;
90         public String loginPwd;
91         public Date lastLoginDate;
92         public boolean active;
93         public boolean internal;
94         public Long selectedProfileId;
95         public Long timeZoneId;
96         public boolean online;
97         public String chatId;
98
99         public Set<CentralUserApp> userApps = null;
100         public Set<CentralRole> pseudoRoles = null;
101
102         public CentralUser() {
103
104         }
105
106         public CentralUser(Long id, Date created, Date modified, Long createdId, Long modifiedId, Long rowNum, Long orgId,
107                         Long managerId, String firstName, String middleInitial, String lastName, String phone, String fax,
108                         String cellular, String email, Long addressId, String alertMethodCd, String hrid, String orgUserId,
109                         String orgCode, String address1, String address2, String city, String state, String zipCode, String country,
110                         String orgManagerUserId, String locationClli, String businessCountryCode, String businessCountryName,
111                         String businessUnit, String businessUnitName, String department, String departmentName, String companyCode,
112                         String company, String zipCodeSuffix, String jobTitle, String commandChain, String siloStatus,
113                         String costCenter, String financialLocCode, String loginId, String loginPwd, Date lastLoginDate,
114                         boolean active, boolean internal, Long selectedProfileId, Long timeZoneId, boolean online, String chatId,
115                         Set<CentralUserApp> userApps, Set<CentralRole> pseudoRoles) {
116                 super();
117                 this.id = id;
118                 this.created = created;
119                 this.modified = modified;
120                 this.createdId = createdId;
121                 this.modifiedId = modifiedId;
122                 this.rowNum = rowNum;
123                 this.orgId = orgId;
124                 this.managerId = managerId;
125                 this.firstName = firstName;
126                 this.middleInitial = middleInitial;
127                 this.lastName = lastName;
128                 this.phone = phone;
129                 this.fax = fax;
130                 this.cellular = cellular;
131                 this.email = email;
132                 this.addressId = addressId;
133                 this.alertMethodCd = alertMethodCd;
134                 this.hrid = hrid;
135                 this.orgUserId = orgUserId;
136                 this.orgCode = orgCode;
137                 this.address1 = address1;
138                 this.address2 = address2;
139                 this.city = city;
140                 this.state = state;
141                 this.zipCode = zipCode;
142                 this.country = country;
143                 this.orgManagerUserId = orgManagerUserId;
144                 this.locationClli = locationClli;
145                 this.businessCountryCode = businessCountryCode;
146                 this.businessCountryName = businessCountryName;
147                 this.businessUnit = businessUnit;
148                 this.businessUnitName = businessUnitName;
149                 this.department = department;
150                 this.departmentName = departmentName;
151                 this.companyCode = companyCode;
152                 this.company = company;
153                 this.zipCodeSuffix = zipCodeSuffix;
154                 this.jobTitle = jobTitle;
155                 this.commandChain = commandChain;
156                 this.siloStatus = siloStatus;
157                 this.costCenter = costCenter;
158                 this.financialLocCode = financialLocCode;
159                 this.loginId = loginId;
160                 this.loginPwd = loginPwd;
161                 this.lastLoginDate = lastLoginDate;
162                 this.active = active;
163                 this.internal = internal;
164                 this.selectedProfileId = selectedProfileId;
165                 this.timeZoneId = timeZoneId;
166                 this.online = online;
167                 this.chatId = chatId;
168                 this.userApps = userApps;
169                 this.pseudoRoles = pseudoRoles;
170         }
171
172         @Override
173         public int hashCode() {
174                 final int prime = 31;
175                 int result = 1;
176                 result = prime * result + (active ? 1231 : 1237);
177                 result = prime * result + ((address1 == null) ? 0 : address1.hashCode());
178                 result = prime * result + ((address2 == null) ? 0 : address2.hashCode());
179                 result = prime * result + ((addressId == null) ? 0 : addressId.hashCode());
180                 result = prime * result + ((alertMethodCd == null) ? 0 : alertMethodCd.hashCode());
181                 result = prime * result + ((businessCountryCode == null) ? 0 : businessCountryCode.hashCode());
182                 result = prime * result + ((businessCountryName == null) ? 0 : businessCountryName.hashCode());
183                 result = prime * result + ((businessUnit == null) ? 0 : businessUnit.hashCode());
184                 result = prime * result + ((businessUnitName == null) ? 0 : businessUnitName.hashCode());
185                 result = prime * result + ((cellular == null) ? 0 : cellular.hashCode());
186                 result = prime * result + ((chatId == null) ? 0 : chatId.hashCode());
187                 result = prime * result + ((city == null) ? 0 : city.hashCode());
188                 result = prime * result + ((commandChain == null) ? 0 : commandChain.hashCode());
189                 result = prime * result + ((company == null) ? 0 : company.hashCode());
190                 result = prime * result + ((companyCode == null) ? 0 : companyCode.hashCode());
191                 result = prime * result + ((costCenter == null) ? 0 : costCenter.hashCode());
192                 result = prime * result + ((country == null) ? 0 : country.hashCode());
193                 result = prime * result + ((created == null) ? 0 : created.hashCode());
194                 result = prime * result + ((createdId == null) ? 0 : createdId.hashCode());
195                 result = prime * result + ((department == null) ? 0 : department.hashCode());
196                 result = prime * result + ((departmentName == null) ? 0 : departmentName.hashCode());
197                 result = prime * result + ((email == null) ? 0 : email.hashCode());
198                 result = prime * result + ((fax == null) ? 0 : fax.hashCode());
199                 result = prime * result + ((financialLocCode == null) ? 0 : financialLocCode.hashCode());
200                 result = prime * result + ((firstName == null) ? 0 : firstName.hashCode());
201                 result = prime * result + ((hrid == null) ? 0 : hrid.hashCode());
202                 result = prime * result + ((id == null) ? 0 : id.hashCode());
203                 result = prime * result + (internal ? 1231 : 1237);
204                 result = prime * result + ((jobTitle == null) ? 0 : jobTitle.hashCode());
205                 result = prime * result + ((lastLoginDate == null) ? 0 : lastLoginDate.hashCode());
206                 result = prime * result + ((lastName == null) ? 0 : lastName.hashCode());
207                 result = prime * result + ((locationClli == null) ? 0 : locationClli.hashCode());
208                 result = prime * result + ((loginId == null) ? 0 : loginId.hashCode());
209                 result = prime * result + ((loginPwd == null) ? 0 : loginPwd.hashCode());
210                 result = prime * result + ((managerId == null) ? 0 : managerId.hashCode());
211                 result = prime * result + ((middleInitial == null) ? 0 : middleInitial.hashCode());
212                 result = prime * result + ((modified == null) ? 0 : modified.hashCode());
213                 result = prime * result + ((modifiedId == null) ? 0 : modifiedId.hashCode());
214                 result = prime * result + (online ? 1231 : 1237);
215                 result = prime * result + ((orgCode == null) ? 0 : orgCode.hashCode());
216                 result = prime * result + ((orgId == null) ? 0 : orgId.hashCode());
217                 result = prime * result + ((orgManagerUserId == null) ? 0 : orgManagerUserId.hashCode());
218                 result = prime * result + ((orgUserId == null) ? 0 : orgUserId.hashCode());
219                 result = prime * result + ((phone == null) ? 0 : phone.hashCode());
220                 result = prime * result + ((pseudoRoles == null) ? 0 : pseudoRoles.hashCode());
221                 result = prime * result + ((rowNum == null) ? 0 : rowNum.hashCode());
222                 result = prime * result + ((selectedProfileId == null) ? 0 : selectedProfileId.hashCode());
223                 result = prime * result + ((siloStatus == null) ? 0 : siloStatus.hashCode());
224                 result = prime * result + ((state == null) ? 0 : state.hashCode());
225                 result = prime * result + ((timeZoneId == null) ? 0 : timeZoneId.hashCode());
226                 result = prime * result + ((userApps == null) ? 0 : userApps.hashCode());
227                 result = prime * result + ((zipCode == null) ? 0 : zipCode.hashCode());
228                 result = prime * result + ((zipCodeSuffix == null) ? 0 : zipCodeSuffix.hashCode());
229                 return result;
230         }
231
232         @Override
233         public boolean equals(Object obj) {
234                 if (this == obj)
235                         return true;
236                 if (obj == null)
237                         return false;
238                 if (getClass() != obj.getClass())
239                         return false;
240                 CentralUser other = (CentralUser) obj;
241                 if (active != other.active)
242                         return false;
243                 if (address1 == null) {
244                         if (other.address1 != null)
245                                 return false;
246                 } else if (!address1.equals(other.address1))
247                         return false;
248                 if (address2 == null) {
249                         if (other.address2 != null)
250                                 return false;
251                 } else if (!address2.equals(other.address2))
252                         return false;
253                 if (addressId == null) {
254                         if (other.addressId != null)
255                                 return false;
256                 } else if (!addressId.equals(other.addressId))
257                         return false;
258                 if (alertMethodCd == null) {
259                         if (other.alertMethodCd != null)
260                                 return false;
261                 } else if (!alertMethodCd.equals(other.alertMethodCd))
262                         return false;
263                 if (businessCountryCode == null) {
264                         if (other.businessCountryCode != null)
265                                 return false;
266                 } else if (!businessCountryCode.equals(other.businessCountryCode))
267                         return false;
268                 if (businessCountryName == null) {
269                         if (other.businessCountryName != null)
270                                 return false;
271                 } else if (!businessCountryName.equals(other.businessCountryName))
272                         return false;
273                 if (businessUnit == null) {
274                         if (other.businessUnit != null)
275                                 return false;
276                 } else if (!businessUnit.equals(other.businessUnit))
277                         return false;
278                 if (businessUnitName == null) {
279                         if (other.businessUnitName != null)
280                                 return false;
281                 } else if (!businessUnitName.equals(other.businessUnitName))
282                         return false;
283                 if (cellular == null) {
284                         if (other.cellular != null)
285                                 return false;
286                 } else if (!cellular.equals(other.cellular))
287                         return false;
288                 if (chatId == null) {
289                         if (other.chatId != null)
290                                 return false;
291                 } else if (!chatId.equals(other.chatId))
292                         return false;
293                 if (city == null) {
294                         if (other.city != null)
295                                 return false;
296                 } else if (!city.equals(other.city))
297                         return false;
298                 if (commandChain == null) {
299                         if (other.commandChain != null)
300                                 return false;
301                 } else if (!commandChain.equals(other.commandChain))
302                         return false;
303                 if (company == null) {
304                         if (other.company != null)
305                                 return false;
306                 } else if (!company.equals(other.company))
307                         return false;
308                 if (companyCode == null) {
309                         if (other.companyCode != null)
310                                 return false;
311                 } else if (!companyCode.equals(other.companyCode))
312                         return false;
313                 if (costCenter == null) {
314                         if (other.costCenter != null)
315                                 return false;
316                 } else if (!costCenter.equals(other.costCenter))
317                         return false;
318                 if (country == null) {
319                         if (other.country != null)
320                                 return false;
321                 } else if (!country.equals(other.country))
322                         return false;
323                 if (created == null) {
324                         if (other.created != null)
325                                 return false;
326                 } else if (!created.equals(other.created))
327                         return false;
328                 if (createdId == null) {
329                         if (other.createdId != null)
330                                 return false;
331                 } else if (!createdId.equals(other.createdId))
332                         return false;
333                 if (department == null) {
334                         if (other.department != null)
335                                 return false;
336                 } else if (!department.equals(other.department))
337                         return false;
338                 if (departmentName == null) {
339                         if (other.departmentName != null)
340                                 return false;
341                 } else if (!departmentName.equals(other.departmentName))
342                         return false;
343                 if (email == null) {
344                         if (other.email != null)
345                                 return false;
346                 } else if (!email.equals(other.email))
347                         return false;
348                 if (fax == null) {
349                         if (other.fax != null)
350                                 return false;
351                 } else if (!fax.equals(other.fax))
352                         return false;
353                 if (financialLocCode == null) {
354                         if (other.financialLocCode != null)
355                                 return false;
356                 } else if (!financialLocCode.equals(other.financialLocCode))
357                         return false;
358                 if (firstName == null) {
359                         if (other.firstName != null)
360                                 return false;
361                 } else if (!firstName.equals(other.firstName))
362                         return false;
363                 if (hrid == null) {
364                         if (other.hrid != null)
365                                 return false;
366                 } else if (!hrid.equals(other.hrid))
367                         return false;
368                 if (id == null) {
369                         if (other.id != null)
370                                 return false;
371                 } else if (!id.equals(other.id))
372                         return false;
373                 if (internal != other.internal)
374                         return false;
375                 if (jobTitle == null) {
376                         if (other.jobTitle != null)
377                                 return false;
378                 } else if (!jobTitle.equals(other.jobTitle))
379                         return false;
380                 if (lastLoginDate == null) {
381                         if (other.lastLoginDate != null)
382                                 return false;
383                 } else if (!lastLoginDate.equals(other.lastLoginDate))
384                         return false;
385                 if (lastName == null) {
386                         if (other.lastName != null)
387                                 return false;
388                 } else if (!lastName.equals(other.lastName))
389                         return false;
390                 if (locationClli == null) {
391                         if (other.locationClli != null)
392                                 return false;
393                 } else if (!locationClli.equals(other.locationClli))
394                         return false;
395                 if (loginId == null) {
396                         if (other.loginId != null)
397                                 return false;
398                 } else if (!loginId.equals(other.loginId))
399                         return false;
400                 if (loginPwd == null) {
401                         if (other.loginPwd != null)
402                                 return false;
403                 } else if (!loginPwd.equals(other.loginPwd))
404                         return false;
405                 if (managerId == null) {
406                         if (other.managerId != null)
407                                 return false;
408                 } else if (!managerId.equals(other.managerId))
409                         return false;
410                 if (middleInitial == null) {
411                         if (other.middleInitial != null)
412                                 return false;
413                 } else if (!middleInitial.equals(other.middleInitial))
414                         return false;
415                 if (modified == null) {
416                         if (other.modified != null)
417                                 return false;
418                 } else if (!modified.equals(other.modified))
419                         return false;
420                 if (modifiedId == null) {
421                         if (other.modifiedId != null)
422                                 return false;
423                 } else if (!modifiedId.equals(other.modifiedId))
424                         return false;
425                 if (online != other.online)
426                         return false;
427                 if (orgCode == null) {
428                         if (other.orgCode != null)
429                                 return false;
430                 } else if (!orgCode.equals(other.orgCode))
431                         return false;
432                 if (orgId == null) {
433                         if (other.orgId != null)
434                                 return false;
435                 } else if (!orgId.equals(other.orgId))
436                         return false;
437                 if (orgManagerUserId == null) {
438                         if (other.orgManagerUserId != null)
439                                 return false;
440                 } else if (!orgManagerUserId.equals(other.orgManagerUserId))
441                         return false;
442                 if (orgUserId == null) {
443                         if (other.orgUserId != null)
444                                 return false;
445                 } else if (!orgUserId.equals(other.orgUserId))
446                         return false;
447                 if (phone == null) {
448                         if (other.phone != null)
449                                 return false;
450                 } else if (!phone.equals(other.phone))
451                         return false;
452                 if (pseudoRoles == null) {
453                         if (other.pseudoRoles != null)
454                                 return false;
455                 } else if (!pseudoRoles.equals(other.pseudoRoles))
456                         return false;
457                 if (rowNum == null) {
458                         if (other.rowNum != null)
459                                 return false;
460                 } else if (!rowNum.equals(other.rowNum))
461                         return false;
462                 if (selectedProfileId == null) {
463                         if (other.selectedProfileId != null)
464                                 return false;
465                 } else if (!selectedProfileId.equals(other.selectedProfileId))
466                         return false;
467                 if (siloStatus == null) {
468                         if (other.siloStatus != null)
469                                 return false;
470                 } else if (!siloStatus.equals(other.siloStatus))
471                         return false;
472                 if (state == null) {
473                         if (other.state != null)
474                                 return false;
475                 } else if (!state.equals(other.state))
476                         return false;
477                 if (timeZoneId == null) {
478                         if (other.timeZoneId != null)
479                                 return false;
480                 } else if (!timeZoneId.equals(other.timeZoneId))
481                         return false;
482                 if (userApps == null) {
483                         if (other.userApps != null)
484                                 return false;
485                 } else if (!userApps.equals(other.userApps))
486                         return false;
487                 if (zipCode == null) {
488                         if (other.zipCode != null)
489                                 return false;
490                 } else if (!zipCode.equals(other.zipCode))
491                         return false;
492                 if (zipCodeSuffix == null) {
493                         if (other.zipCodeSuffix != null)
494                                 return false;
495                 } else if (!zipCodeSuffix.equals(other.zipCodeSuffix))
496                         return false;
497                 return true;
498         }
499
500 }