Replace ecomp references
[portal.git] / ecomp-portal-BE-common / src / main / java / org / onap / portalapp / portal / transport / RoleInAppForUser.java
1 /*-
2  * ============LICENSE_START==========================================
3  * ONAP Portal
4  * ===================================================================
5  * Copyright (C) 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  * 
37  */
38 package org.onap.portalapp.portal.transport;
39
40 public class RoleInAppForUser {
41
42
43         public RoleInAppForUser() {
44         }
45         
46         public RoleInAppForUser(Long id, String name) {
47                 this.roleId = id;
48                 this.roleName = name;
49         }
50
51         public Long roleId;
52
53         public String roleName;
54
55         public Boolean isApplied;
56
57         public Long getRoleId() {
58                 return roleId;
59         }
60
61         public void setRoleId(Long roleId) {
62                 this.roleId = roleId;
63         }
64
65         public String getRoleName() {
66                 return roleName;
67         }
68
69         public void setRoleName(String roleName) {
70                 this.roleName = roleName;
71         }
72
73         public Boolean getIsApplied() {
74                 return isApplied;
75         }
76
77         public void setIsApplied(Boolean isApplied) {
78                 this.isApplied = isApplied;
79         }
80
81         @Override
82         public String toString() {
83                 return "RoleInAppForUser [roleId=" + roleId + ", roleName=" + roleName + ", isApplied=" + isApplied + "]";
84         }
85
86         @Override
87         public int hashCode() {
88                 final int prime = 31;
89                 int result = 1;
90                 result = prime * result + ((isApplied == null) ? 0 : isApplied.hashCode());
91                 result = prime * result + ((roleId == null) ? 0 : roleId.hashCode());
92                 result = prime * result + ((roleName == null) ? 0 : roleName.hashCode());
93                 return result;
94         }
95
96         @Override
97         public boolean equals(Object obj) {
98                 if (this == obj)
99                         return true;
100                 if (obj == null)
101                         return false;
102                 if (getClass() != obj.getClass())
103                         return false;
104                 RoleInAppForUser other = (RoleInAppForUser) obj;
105                 if (isApplied == null) {
106                         if (other.isApplied != null)
107                                 return false;
108                 } else if (!isApplied.equals(other.isApplied))
109                         return false;
110                 if (roleId == null) {
111                         if (other.roleId != null)
112                                 return false;
113                 } else if (!roleId.equals(other.roleId))
114                         return false;
115                 if (roleName == null) {
116                         if (other.roleName != null)
117                                 return false;
118                 } else if (!roleName.equals(other.roleName))
119                         return false;
120                 return true;
121         }
122         
123 }