[PORTAL-7] Rebase
[portal.git] / ecomp-portal-BE-common / src / main / java / org / openecomp / portalapp / portal / transport / RoleInAppForUser.java
1 /*-\r
2  * ================================================================================\r
3  * ECOMP Portal\r
4  * ================================================================================\r
5  * Copyright (C) 2017 AT&T Intellectual Property\r
6  * ================================================================================\r
7  * Licensed under the Apache License, Version 2.0 (the "License");\r
8  * you may not use this file except in compliance with the License.\r
9  * You may obtain a copy of the License at\r
10  * \r
11  *      http://www.apache.org/licenses/LICENSE-2.0\r
12  * \r
13  * Unless required by applicable law or agreed to in writing, software\r
14  * distributed under the License is distributed on an "AS IS" BASIS,\r
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
16  * See the License for the specific language governing permissions and\r
17  * limitations under the License.\r
18  * ================================================================================\r
19  */\r
20 package org.openecomp.portalapp.portal.transport;\r
21 \r
22 public class RoleInAppForUser {\r
23 \r
24 \r
25         public RoleInAppForUser() {\r
26         }\r
27         \r
28         public RoleInAppForUser(Long id, String name) {\r
29                 this.roleId = id;\r
30                 this.roleName = name;\r
31         }\r
32 \r
33         public Long roleId;\r
34 \r
35         public String roleName;\r
36 \r
37         public Boolean isApplied;\r
38 \r
39         public Long getRoleId() {\r
40                 return roleId;\r
41         }\r
42 \r
43         public void setRoleId(Long roleId) {\r
44                 this.roleId = roleId;\r
45         }\r
46 \r
47         public String getRoleName() {\r
48                 return roleName;\r
49         }\r
50 \r
51         public void setRoleName(String roleName) {\r
52                 this.roleName = roleName;\r
53         }\r
54 \r
55         public Boolean getIsApplied() {\r
56                 return isApplied;\r
57         }\r
58 \r
59         public void setIsApplied(Boolean isApplied) {\r
60                 this.isApplied = isApplied;\r
61         }\r
62 \r
63         @Override\r
64         public String toString() {\r
65                 return "RoleInAppForUser [roleId=" + roleId + ", roleName=" + roleName + ", isApplied=" + isApplied + "]";\r
66         }\r
67 \r
68         @Override\r
69         public int hashCode() {\r
70                 final int prime = 31;\r
71                 int result = 1;\r
72                 result = prime * result + ((isApplied == null) ? 0 : isApplied.hashCode());\r
73                 result = prime * result + ((roleId == null) ? 0 : roleId.hashCode());\r
74                 result = prime * result + ((roleName == null) ? 0 : roleName.hashCode());\r
75                 return result;\r
76         }\r
77 \r
78         @Override\r
79         public boolean equals(Object obj) {\r
80                 if (this == obj)\r
81                         return true;\r
82                 if (obj == null)\r
83                         return false;\r
84                 if (getClass() != obj.getClass())\r
85                         return false;\r
86                 RoleInAppForUser other = (RoleInAppForUser) obj;\r
87                 if (isApplied == null) {\r
88                         if (other.isApplied != null)\r
89                                 return false;\r
90                 } else if (!isApplied.equals(other.isApplied))\r
91                         return false;\r
92                 if (roleId == null) {\r
93                         if (other.roleId != null)\r
94                                 return false;\r
95                 } else if (!roleId.equals(other.roleId))\r
96                         return false;\r
97                 if (roleName == null) {\r
98                         if (other.roleName != null)\r
99                                 return false;\r
100                 } else if (!roleName.equals(other.roleName))\r
101                         return false;\r
102                 return true;\r
103         }\r
104         \r
105 }\r