fc9bc88ce93da8904365f4ac0cb97524a7749551
[portal.git] / ecomp-portal-BE-common / src / main / java / org / openecomp / portalapp / portal / transport / AppsListWithAdminRole.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 import java.util.ArrayList;
23
24 public class AppsListWithAdminRole {
25
26         public String orgUserId;
27
28         public ArrayList<AppNameIdIsAdmin> appsRoles;
29
30         public AppsListWithAdminRole() {
31                 appsRoles = new ArrayList<AppNameIdIsAdmin>();
32         }
33
34         public String getOrgUserId() {
35                 return orgUserId;
36         }
37
38         public void setOrgUserId(String orgUserId) {
39                 this.orgUserId = orgUserId;
40         }
41
42         public ArrayList<AppNameIdIsAdmin> getAppsRoles() {
43                 return appsRoles;
44         }
45
46         public void setAppsRoles(ArrayList<AppNameIdIsAdmin> appsRoles) {
47                 this.appsRoles = appsRoles;
48         }
49
50         @Override
51         public String toString() {
52                 return "AppsListWithAdminRole [orgUserId=" + orgUserId + ", appsRoles=" + appsRoles + "]";
53         }
54
55         @Override
56         public int hashCode() {
57                 final int prime = 31;
58                 int result = 1;
59                 result = prime * result + ((appsRoles == null) ? 0 : appsRoles.hashCode());
60                 result = prime * result + ((orgUserId == null) ? 0 : orgUserId.hashCode());
61                 return result;
62         }
63
64         @Override
65         public boolean equals(Object obj) {
66                 if (this == obj)
67                         return true;
68                 if (obj == null)
69                         return false;
70                 if (getClass() != obj.getClass())
71                         return false;
72                 AppsListWithAdminRole other = (AppsListWithAdminRole) obj;
73                 if (appsRoles == null) {
74                         if (other.appsRoles != null)
75                                 return false;
76                 } else if (!appsRoles.equals(other.appsRoles))
77                         return false;
78                 if (orgUserId == null) {
79                         if (other.orgUserId != null)
80                                 return false;
81                 } else if (!orgUserId.equals(other.orgUserId))
82                         return false;
83                 return true;
84         }
85
86 }