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