Add mock user data to backend
[portal/ric-dashboard.git] / webapp-backend / src / main / java / org / oransc / ric / portal / dashboard / model / DashboardUser.java
1 /*-
2  * ========================LICENSE_START=================================
3  * O-RAN-SC
4  * %%
5  * Copyright (C) 2019 AT&T Intellectual Property and Nokia
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  * ========================LICENSE_END===================================
19  */
20
21 /*
22  * TODO: this mocks user properties until integration with ONAP Portal is done.
23  */
24 package org.oransc.ric.portal.dashboard.model;
25
26 import java.util.Objects;
27
28 public class DashboardUser {
29
30         private long id;
31         private String firstName;
32         private String lastName;
33         private String status;
34
35         public DashboardUser() {
36         }
37
38         public DashboardUser(long id, String firstName, String lastName, String status) {
39                 this.id = id;
40                 this.firstName = firstName;
41                 this.lastName = lastName;
42                 this.status = status;
43         }
44
45         public long getId() {
46                 return id;
47         }
48
49         public void setId(long id) {
50                 this.id = id;
51         }
52
53         public String getFirstName() {
54                 return firstName;
55         }
56
57         public void setFirstName(String firstName) {
58                 this.firstName = firstName;
59         }
60
61         public String getLastName() {
62                 return lastName;
63         }
64
65         public void setLastName(String lastName) {
66                 this.lastName = lastName;
67         }
68
69         public String getStatus() {
70                 return status;
71         }
72
73         public void setStatus(String status) {
74                 this.status = status;
75         }
76
77         @Override
78         public int hashCode() {
79                 final int prime = 31;
80                 int result = 1;
81                 result = prime * result + ((firstName == null) ? 0 : firstName.hashCode());
82                 result = prime * result + (int) (id ^ (id >>> 32));
83                 result = prime * result + ((lastName == null) ? 0 : lastName.hashCode());
84                 result = prime * result + ((status == null) ? 0 : status.hashCode());
85                 return result;
86         }
87
88         @Override
89         public boolean equals(Object obj) {
90                 if (this == obj)
91                         return true;
92                 if (obj == null)
93                         return false;
94                 if (getClass() != obj.getClass())
95                         return false;
96                 DashboardUser other = (DashboardUser) obj;
97                 return Objects.equals(id, other.id) && Objects.equals(firstName, other.firstName)
98                                 && Objects.equals(lastName, other.lastName) && Objects.equals(status, other.status);
99         }
100
101 }