View Javadoc
1   /*
2     * #%L
3     * Quadrige3 Core
4     * %%
5     * Copyright (C) 2017 Ifremer
6     * %%
7     * This program is free software: you can redistribute it and/or modify
8     * it under the terms of the GNU Affero General Public License as published by
9     * the Free Software Foundation, either version 3 of the License, or
10    * (at your option) any later version.
11    *
12    * This program is distributed in the hope that it will be useful,
13    * but WITHOUT ANY WARRANTY; without even the implied warranty of
14    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    * GNU General Public License for more details.
16    *
17    * You should have received a copy of the GNU Affero General Public License
18    * along with this program.  If not, see <http://www.gnu.org/licenses/>.
19    * #L%
20    */
21  //
22  /**
23   * @author Generated on 07/22/2024 16:45:05+0200 Do not modify by hand!
24   *
25   * TEMPLATE:     ValueObject.vsl in andromda-java-cartridge.
26   * MODEL CLASS:  Données::fr.ifremer.quadrige3.core::vo::administration::user::QuserVO
27   * STEREOTYPE:   ValueObject
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   * Liste l'ensemble des agents et utilisateurs du système.
42   */
43  public class QuserVO
44      implements Serializable, Comparable<QuserVO>
45  {
46      /** The serial version UID of this class. Needed for serialization. */
47      private static final long serialVersionUID = 4074989181736461905L;
48  
49      // Class attributes
50      /**
51       * Identifiant interne d'un agent
52       */
53      protected Integer quserId;
54      /**
55       * Matricule : identifie de manière unique une personne dans LDAP, attribut obligatoire dans
56       * LDAP
57       */
58      protected String quserCd;
59      /**
60       * Nom de l'agent, obligatoire
61       */
62      protected String quserLastNm;
63      /**
64       * Prénom de l'agent
65       */
66      protected String quserFirstNm;
67      /**
68       * UID du LDAP intranet de l'agent s'il existe
69       */
70      protected String quserIntranetLg;
71      /**
72       * UID du LDAP extranet de l'agent s'il existe
73       */
74      protected String quserExtranetLg;
75      /**
76       * Adresse électronique de la personne
77       */
78      protected String quserEMail;
79      /**
80       * Adresse du site dans le LDAP, ou informations sur l'adresse de l'utilisateur.
81       */
82      protected String quserAddress;
83      /**
84       * Liste des téléphones de la personnes
85       */
86      protected String quserPhone;
87      /**
88       * Organisme dont dépend la personne (voir avec service)!!!
89       */
90      protected String quserOrgan;
91      /**
92       * Centre administratif dont dépend la personne (voir avec service) !!
93       */
94      protected String quserAdminCenter;
95      /**
96       * Site auquel est affectée la personne
97       */
98      protected String quserSite;
99      /**
100      * Oui, si l'utilisateur est présent dans le LDAP (code renseigné).
101      */
102     protected String quserLdapPresent;
103     /**
104      * Date de création de l'objet
105      */
106     protected Date quserCreationDt;
107     /**
108      * Date de modification de l'objet
109      */
110     protected Timestamp updateDt;
111     /**
112      * Code de l'état de l'objet (actif ou inactif)
113      */
114     protected String statusCd;
115     /**
116      * Identifiant interne d'un service
117      */
118     protected Integer depId;
119 
120     // Class associationEnds
121     /**
122      * Liste les départements ou services auxquels sont rattachés les agents
123      */
124     protected DepartmentVO department;
125 
126     /** TODO: Model Documentation for attribute privileges */
127     protected PrivilegeVO[] privileges;
128 
129     /** Default Constructor with no properties */
130     public QuserVO()
131     {
132         // Documented empty block - avoid compiler warning - no super constructor
133     }
134 
135     /**
136      * Constructor taking only required properties
137      * @param quserIdIn Integer Identifiant interne d'un agent
138      * @param quserLastNmIn String Nom de l'agent, obligatoire
139      * @param quserFirstNmIn String Prénom de l'agent
140      * @param statusCdIn String Code de l'état de l'objet (actif ou inactif)
141      * @param depIdIn Integer Identifiant interne d'un service
142      * @param departmentIn DepartmentVO Liste les départements ou services auxquels sont rattachés les agents
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      * Constructor with all properties
156      * @param quserIdIn Integer
157      * @param quserCdIn String
158      * @param quserLastNmIn String
159      * @param quserFirstNmIn String
160      * @param quserIntranetLgIn String
161      * @param quserExtranetLgIn String
162      * @param quserEMailIn String
163      * @param quserAddressIn String
164      * @param quserPhoneIn String
165      * @param quserOrganIn String
166      * @param quserAdminCenterIn String
167      * @param quserSiteIn String
168      * @param quserLdapPresentIn String
169      * @param quserCreationDtIn Date
170      * @param updateDtIn Timestamp
171      * @param statusCdIn String
172      * @param depIdIn Integer
173      * @param departmentIn DepartmentVO
174      * @param privilegesIn PrivilegeVO[]
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      * Copies constructor from other QuserVO
201      *
202      * @param otherBean Cannot be <code>null</code>
203      * @throws NullPointerException if the argument is <code>null</code>
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      * Copies all properties from the argument value object into this value object.
230      * @param otherBean Cannot be <code>null</code>
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      * Identifiant interne d'un agent
260      * Get the quserId Attribute
261      * @return quserId Integer
262      */
263     public Integer getQuserId()
264     {
265         return this.quserId;
266     }
267 
268     /**
269      * Identifiant interne d'un agent
270      * @param value Integer
271      */
272     public void setQuserId(final Integer value)
273     {
274         this.quserId = value;
275     }
276 
277     /**
278      * Matricule : identifie de manière unique une personne dans LDAP, attribut obligatoire dans
279      * LDAP
280      * Get the quserCd Attribute
281      * @return quserCd String
282      */
283     public String getQuserCd()
284     {
285         return this.quserCd;
286     }
287 
288     /**
289      * Matricule : identifie de manière unique une personne dans LDAP, attribut obligatoire dans
290      * LDAP
291      * @param value String
292      */
293     public void setQuserCd(final String value)
294     {
295         this.quserCd = value;
296     }
297 
298     /**
299      * Nom de l'agent, obligatoire
300      * Get the quserLastNm Attribute
301      * @return quserLastNm String
302      */
303     public String getQuserLastNm()
304     {
305         return this.quserLastNm;
306     }
307 
308     /**
309      * Nom de l'agent, obligatoire
310      * @param value String
311      */
312     public void setQuserLastNm(final String value)
313     {
314         this.quserLastNm = value;
315     }
316 
317     /**
318      * Prénom de l'agent
319      * Get the quserFirstNm Attribute
320      * @return quserFirstNm String
321      */
322     public String getQuserFirstNm()
323     {
324         return this.quserFirstNm;
325     }
326 
327     /**
328      * Prénom de l'agent
329      * @param value String
330      */
331     public void setQuserFirstNm(final String value)
332     {
333         this.quserFirstNm = value;
334     }
335 
336     /**
337      * UID du LDAP intranet de l'agent s'il existe
338      * Get the quserIntranetLg Attribute
339      * @return quserIntranetLg String
340      */
341     public String getQuserIntranetLg()
342     {
343         return this.quserIntranetLg;
344     }
345 
346     /**
347      * UID du LDAP intranet de l'agent s'il existe
348      * @param value String
349      */
350     public void setQuserIntranetLg(final String value)
351     {
352         this.quserIntranetLg = value;
353     }
354 
355     /**
356      * UID du LDAP extranet de l'agent s'il existe
357      * Get the quserExtranetLg Attribute
358      * @return quserExtranetLg String
359      */
360     public String getQuserExtranetLg()
361     {
362         return this.quserExtranetLg;
363     }
364 
365     /**
366      * UID du LDAP extranet de l'agent s'il existe
367      * @param value String
368      */
369     public void setQuserExtranetLg(final String value)
370     {
371         this.quserExtranetLg = value;
372     }
373 
374     /**
375      * Adresse électronique de la personne
376      * Get the quserEMail Attribute
377      * @return quserEMail String
378      */
379     public String getQuserEMail()
380     {
381         return this.quserEMail;
382     }
383 
384     /**
385      * Adresse électronique de la personne
386      * @param value String
387      */
388     public void setQuserEMail(final String value)
389     {
390         this.quserEMail = value;
391     }
392 
393     /**
394      * Adresse du site dans le LDAP, ou informations sur l'adresse de l'utilisateur.
395      * Get the quserAddress Attribute
396      * @return quserAddress String
397      */
398     public String getQuserAddress()
399     {
400         return this.quserAddress;
401     }
402 
403     /**
404      * Adresse du site dans le LDAP, ou informations sur l'adresse de l'utilisateur.
405      * @param value String
406      */
407     public void setQuserAddress(final String value)
408     {
409         this.quserAddress = value;
410     }
411 
412     /**
413      * Liste des téléphones de la personnes
414      * Get the quserPhone Attribute
415      * @return quserPhone String
416      */
417     public String getQuserPhone()
418     {
419         return this.quserPhone;
420     }
421 
422     /**
423      * Liste des téléphones de la personnes
424      * @param value String
425      */
426     public void setQuserPhone(final String value)
427     {
428         this.quserPhone = value;
429     }
430 
431     /**
432      * Organisme dont dépend la personne (voir avec service)!!!
433      * Get the quserOrgan Attribute
434      * @return quserOrgan String
435      */
436     public String getQuserOrgan()
437     {
438         return this.quserOrgan;
439     }
440 
441     /**
442      * Organisme dont dépend la personne (voir avec service)!!!
443      * @param value String
444      */
445     public void setQuserOrgan(final String value)
446     {
447         this.quserOrgan = value;
448     }
449 
450     /**
451      * Centre administratif dont dépend la personne (voir avec service) !!
452      * Get the quserAdminCenter Attribute
453      * @return quserAdminCenter String
454      */
455     public String getQuserAdminCenter()
456     {
457         return this.quserAdminCenter;
458     }
459 
460     /**
461      * Centre administratif dont dépend la personne (voir avec service) !!
462      * @param value String
463      */
464     public void setQuserAdminCenter(final String value)
465     {
466         this.quserAdminCenter = value;
467     }
468 
469     /**
470      * Site auquel est affectée la personne
471      * Get the quserSite Attribute
472      * @return quserSite String
473      */
474     public String getQuserSite()
475     {
476         return this.quserSite;
477     }
478 
479     /**
480      * Site auquel est affectée la personne
481      * @param value String
482      */
483     public void setQuserSite(final String value)
484     {
485         this.quserSite = value;
486     }
487 
488     /**
489      * Oui, si l'utilisateur est présent dans le LDAP (code renseigné).
490      * Get the quserLdapPresent Attribute
491      * @return quserLdapPresent String
492      */
493     public String getQuserLdapPresent()
494     {
495         return this.quserLdapPresent;
496     }
497 
498     /**
499      * Oui, si l'utilisateur est présent dans le LDAP (code renseigné).
500      * @param value String
501      */
502     public void setQuserLdapPresent(final String value)
503     {
504         this.quserLdapPresent = value;
505     }
506 
507     /**
508      * Date de création de l'objet
509      * Get the quserCreationDt Attribute
510      * @return quserCreationDt Date
511      */
512     public Date getQuserCreationDt()
513     {
514         return this.quserCreationDt;
515     }
516 
517     /**
518      * Date de création de l'objet
519      * @param value Date
520      */
521     public void setQuserCreationDt(final Date value)
522     {
523         this.quserCreationDt = value;
524     }
525 
526     /**
527      * Date de modification de l'objet
528      * Get the updateDt Attribute
529      * @return updateDt Timestamp
530      */
531     public Timestamp getUpdateDt()
532     {
533         return this.updateDt;
534     }
535 
536     /**
537      * Date de modification de l'objet
538      * @param value Timestamp
539      */
540     public void setUpdateDt(final Timestamp value)
541     {
542         this.updateDt = value;
543     }
544 
545     /**
546      * Code de l'état de l'objet (actif ou inactif)
547      * Get the statusCd Attribute
548      * @return statusCd String
549      */
550     public String getStatusCd()
551     {
552         return this.statusCd;
553     }
554 
555     /**
556      * Code de l'état de l'objet (actif ou inactif)
557      * @param value String
558      */
559     public void setStatusCd(final String value)
560     {
561         this.statusCd = value;
562     }
563 
564     /**
565      * Identifiant interne d'un service
566      * Get the depId Attribute
567      * @return depId Integer
568      */
569     public Integer getDepId()
570     {
571         return this.depId;
572     }
573 
574     /**
575      * Identifiant interne d'un service
576      * @param value Integer
577      */
578     public void setDepId(final Integer value)
579     {
580         this.depId = value;
581     }
582 
583     /**
584      * Liste les départements ou services auxquels sont rattachés les agents
585      * Get the department Association
586      * @return this.department DepartmentVO
587      */
588     public DepartmentVO getDepartment()
589     {
590         return this.department;
591     }
592 
593     /**
594      * Sets the department
595      * @param value DepartmentVO
596      */
597     public void setDepartment(DepartmentVO value)
598     {
599         this.department = value;
600     }
601 
602     /**
603      * TODO: Model Documentation for association privileges
604      * Get the privileges Association
605      * This accessor method returns a reference to the live list,
606      * not a snapshot. Therefore any modification you make to the
607      * returned list will be present inside the object.
608      * @return this.privileges PrivilegeVO[]
609      */
610     public PrivilegeVO[] getPrivileges()
611     {
612         return this.privileges;
613     }
614 
615     /**
616      * Sets the privileges
617      * @param value PrivilegeVO[]
618      */
619     public void setPrivileges(PrivilegeVO[] value)
620     {
621         this.privileges = value;
622     }
623 
624     /**
625      * @param object to compare this object against
626      * @return boolean if equal
627      * @see Object#equals(Object)
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         // Check if the same object instance
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      * @param object to compare this object against
667      * @return int if equal
668      * @see Comparable#compareTo(Object)
669      */
670     public int compareTo(final QuserVO object)
671     {
672         if (object==null)
673         {
674             return -1;
675         }
676         // Check if the same object instance
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      * @return int hashCode value
706      * @see Object#hashCode()
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      * @return String representation of object
736      * @see Object#toString()
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      * This is a convenient helper method which is able to detect whether or not two values are equal. Two values
766      * are equal when they are both {@code null}, are arrays of the same length with equal elements or are
767      * equal objects (this includes {@link java.util.Collection} and {@link java.util.Map} instances).
768      *
769      * <p/>Note that for array, collection or map instances the comparison runs one level deep.
770      *
771      * @param first the first object to compare, may be {@code null}
772      * @param second the second object to compare, may be {@code null}
773      * @return this method will return {@code true} in case both objects are equal as explained above;
774      *      in all other cases this method will return {@code false}
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 // note that the following also covers java.util.Collection and java.util.Map
789         {
790             equal = first.equals(second);
791         }
792 
793         return equal;
794     }
795 
796     // QuserVO value-object java merge-point
797 }