dd013c78cde93de7335a2f21884b991f649f504a
[portal.git] / ecomp-portal-BE-common / src / main / java / org / onap / portalapp / portal / transport / ExternalRoleDescription.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 ExternalRoleDescription {
41
42         private String id;
43         private String  name;
44     private String active;
45     private String priority;
46     private String appId;
47     private String appRoleId;
48     
49         public String getId() {
50                 return id;
51         }
52         public void setId(String id) {
53                 this.id = id;
54         }
55         public String getName() {
56                 return name;
57         }
58         public void setName(String name) {
59                 this.name = name;
60         }
61         public String getActive() {
62                 return active;
63         }
64         public void setActive(String active) {
65                 this.active = active;
66         }
67         public String getPriority() {
68                 return priority;
69         }
70         public void setPriority(String priority) {
71                 this.priority = priority;
72         }
73         public String getAppId() {
74                 return appId;
75         }
76         public void setAppId(String appId) {
77                 this.appId = appId;
78         }
79         public String getAppRoleId() {
80                 return appRoleId;
81         }
82         public void setAppRoleId(String appRoleId) {
83                 this.appRoleId = appRoleId;
84         }
85         @Override
86         public int hashCode() {
87                 final int prime = 31;
88                 int result = 1;
89                 result = prime * result + ((active == null) ? 0 : active.hashCode());
90                 result = prime * result + ((appId == null) ? 0 : appId.hashCode());
91                 result = prime * result + ((appRoleId == null) ? 0 : appRoleId.hashCode());
92                 result = prime * result + ((id == null) ? 0 : id.hashCode());
93                 result = prime * result + ((name == null) ? 0 : name.hashCode());
94                 result = prime * result + ((priority == null) ? 0 : priority.hashCode());
95                 return result;
96         }
97         @Override
98         public boolean equals(Object obj) {
99                 if (this == obj)
100                         return true;
101                 if (obj == null)
102                         return false;
103                 if (getClass() != obj.getClass())
104                         return false;
105                 ExternalRoleDescription other = (ExternalRoleDescription) obj;
106                 if (active == null) {
107                         if (other.active != null)
108                                 return false;
109                 } else if (!active.equals(other.active))
110                         return false;
111                 if (appId == null) {
112                         if (other.appId != null)
113                                 return false;
114                 } else if (!appId.equals(other.appId))
115                         return false;
116                 if (appRoleId == null) {
117                         if (other.appRoleId != null)
118                                 return false;
119                 } else if (!appRoleId.equals(other.appRoleId))
120                         return false;
121                 if (id == null) {
122                         if (other.id != null)
123                                 return false;
124                 } else if (!id.equals(other.id))
125                         return false;
126                 if (name == null) {
127                         if (other.name != null)
128                                 return false;
129                 } else if (!name.equals(other.name))
130                         return false;
131                 if (priority == null) {
132                         if (other.priority != null)
133                                 return false;
134                 } else if (!priority.equals(other.priority))
135                         return false;
136                 return true;
137         }
138     
139     
140 }