Fix: Update Sonar needed parameters
[oam/tr069-adapter.git] / acs / common / src / main / java / org / commscope / tr069adapter / acs / common / dto / ParameterAttributeDTO.java
1 /*\r
2  * ============LICENSE_START========================================================================\r
3  * ONAP : tr-069-adapter\r
4  * =================================================================================================\r
5  * Copyright (C) 2020 CommScope Inc Intellectual Property.\r
6  * =================================================================================================\r
7  * This tr-069-adapter software file is distributed by CommScope Inc under the Apache License,\r
8  * Version 2.0 (the "License"); you may not use this file except in compliance with the License. You\r
9  * may obtain a copy of the License at\r
10  *\r
11  * http://www.apache.org/licenses/LICENSE-2.0\r
12  *\r
13  * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,\r
14  * either express or implied. See the License for the specific language governing permissions and\r
15  * limitations under the License.\r
16  * ===============LICENSE_END=======================================================================\r
17  */\r
18 \r
19 package org.commscope.tr069adapter.acs.common.dto;\r
20 \r
21 import java.util.Arrays;\r
22 \r
23 import org.commscope.tr069adapter.acs.common.ParameterDTO;\r
24 \r
25 public class ParameterAttributeDTO extends ParameterDTO {\r
26 \r
27   private static final long serialVersionUID = 3036245080206860431L;\r
28 \r
29   private boolean notificationChange;\r
30 \r
31   private boolean accesslistChange;\r
32 \r
33   private int notification;\r
34 \r
35   private String[] accessList;\r
36 \r
37   public boolean getNotificationChange() {\r
38     return notificationChange;\r
39   }\r
40 \r
41   public void setNotificationChange(boolean notificationChange) {\r
42     this.notificationChange = notificationChange;\r
43   }\r
44 \r
45   public boolean getAccesslistChange() {\r
46     return accesslistChange;\r
47   }\r
48 \r
49   public void setAccesslistChange(boolean accesslistChange) {\r
50     this.accesslistChange = accesslistChange;\r
51   }\r
52 \r
53   public int getNotification() {\r
54     return notification;\r
55   }\r
56 \r
57   public void setNotification(int notification) {\r
58     this.notification = notification;\r
59   }\r
60 \r
61   public String[] getAccessList() {\r
62     return accessList;\r
63   }\r
64 \r
65   public void setAccessList(String[] accessList) {\r
66     this.accessList = accessList;\r
67   }\r
68 \r
69   @Override\r
70   public int hashCode() {\r
71     final int prime = 31;\r
72     int result = super.hashCode();\r
73     result = prime * result + Arrays.hashCode(accessList);\r
74     result = prime * result + (accesslistChange ? 1231 : 1237);\r
75     result = prime * result + notification;\r
76     result = prime * result + (notificationChange ? 1231 : 1237);\r
77     return result;\r
78   }\r
79 \r
80   @Override\r
81   public boolean equals(Object obj) {\r
82     if (this == obj)\r
83       return true;\r
84     if (!super.equals(obj))\r
85       return false;\r
86     if (getClass() != obj.getClass())\r
87       return false;\r
88     ParameterAttributeDTO other = (ParameterAttributeDTO) obj;\r
89     if (!Arrays.equals(accessList, other.accessList))\r
90       return false;\r
91     if (accesslistChange != other.accesslistChange)\r
92       return false;\r
93     if (notification != other.notification)\r
94       return false;\r
95     return (notificationChange != other.notificationChange);\r
96   }\r
97 \r
98 }\r