[PORTAL-7] Rebase
[portal.git] / ecomp-portal-BE-common / src / main / java / org / openecomp / portalapp / portal / transport / AppNameIdIsAdmin.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 AppNameIdIsAdmin {\r
23 \r
24         public Long id;\r
25 \r
26         public String appName;\r
27 \r
28         public Boolean isAdmin;\r
29 \r
30         public Boolean restrictedApp;\r
31 \r
32         public Long getId() {\r
33                 return id;\r
34         }\r
35 \r
36         public void setId(Long id) {\r
37                 this.id = id;\r
38         }\r
39 \r
40         public String getAppName() {\r
41                 return appName;\r
42         }\r
43 \r
44         public void setAppName(String appName) {\r
45                 this.appName = appName;\r
46         }\r
47 \r
48         public Boolean getIsAdmin() {\r
49                 return isAdmin;\r
50         }\r
51 \r
52         public void setIsAdmin(Boolean isAdmin) {\r
53                 this.isAdmin = isAdmin;\r
54         }\r
55 \r
56         public Boolean getRestrictedApp() {\r
57                 return restrictedApp;\r
58         }\r
59 \r
60         public void setRestrictedApp(Boolean restrictedApp) {\r
61                 this.restrictedApp = restrictedApp;\r
62         }\r
63 \r
64         @Override\r
65         public int hashCode() {\r
66                 final int prime = 31;\r
67                 int result = 1;\r
68                 result = prime * result + ((appName == null) ? 0 : appName.hashCode());\r
69                 result = prime * result + ((id == null) ? 0 : id.hashCode());\r
70                 result = prime * result + ((isAdmin == null) ? 0 : isAdmin.hashCode());\r
71                 result = prime * result + ((restrictedApp == null) ? 0 : restrictedApp.hashCode());\r
72                 return result;\r
73         }\r
74 \r
75         @Override\r
76         public boolean equals(Object obj) {\r
77                 if (this == obj)\r
78                         return true;\r
79                 if (obj == null)\r
80                         return false;\r
81                 if (getClass() != obj.getClass())\r
82                         return false;\r
83                 AppNameIdIsAdmin other = (AppNameIdIsAdmin) obj;\r
84                 if (appName == null) {\r
85                         if (other.appName != null)\r
86                                 return false;\r
87                 } else if (!appName.equals(other.appName))\r
88                         return false;\r
89                 if (id == null) {\r
90                         if (other.id != null)\r
91                                 return false;\r
92                 } else if (!id.equals(other.id))\r
93                         return false;\r
94                 if (isAdmin == null) {\r
95                         if (other.isAdmin != null)\r
96                                 return false;\r
97                 } else if (!isAdmin.equals(other.isAdmin))\r
98                         return false;\r
99                 if (restrictedApp == null) {\r
100                         if (other.restrictedApp != null)\r
101                                 return false;\r
102                 } else if (!restrictedApp.equals(other.restrictedApp))\r
103                         return false;\r
104                 return true;\r
105         }\r
106 \r
107         @Override\r
108         public String toString() {\r
109                 return "AppNameIdIsAdmin [id=" + id + ", appName=" + appName + ", isAdmin=" + isAdmin + ", restrictedApp="\r
110                                 + restrictedApp + "]";\r
111         }\r
112         \r
113         \r
114 }\r