74dbd1abd06e54d3736255f8d54744d9857a1812
[portal.git] / ecomp-portal-BE-common / src / main / java / org / openecomp / portalapp / portal / transport / RemoteRole.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 RemoteRole {
23
24         private Long id;
25         private String name;
26         
27         public Long getId() {
28                 return id;
29         }
30         public void setId(Long id) {
31                 this.id = id;
32         }
33         public String getName() {
34                 return name;
35         }
36         public void setName(String name) {
37                 this.name = name;
38         }
39         
40         @Override
41         public String toString() {
42                 return "RemoteRole [id=" + id + ", name=" + name + "]";
43         }
44         @Override
45         public int hashCode() {
46                 final int prime = 31;
47                 int result = 1;
48                 result = prime * result + ((id == null) ? 0 : id.hashCode());
49                 result = prime * result + ((name == null) ? 0 : name.hashCode());
50                 return result;
51         }
52         @Override
53         public boolean equals(Object obj) {
54                 if (this == obj)
55                         return true;
56                 if (obj == null)
57                         return false;
58                 if (getClass() != obj.getClass())
59                         return false;
60                 RemoteRole other = (RemoteRole) obj;
61                 if (id == null) {
62                         if (other.id != null)
63                                 return false;
64                 } else if (!id.equals(other.id))
65                         return false;
66                 if (name == null) {
67                         if (other.name != null)
68                                 return false;
69                 } else if (!name.equals(other.name))
70                         return false;
71                 return true;
72         }
73 }