Added license header and other review comments
[msb/java-sdk.git] / example-spring-boot / src / main / java / org / onap / msb / sdk / example / springboot / model / Employee.java
1 /*******************************************************************************
2  * Copyright 2017 Infosys Limited and others.
3  *------------------------------------------------------------------------------
4  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
5  * in compliance with the License. You may obtain a copy of the License at
6  * http://www.apache.org/licenses/LICENSE-2.0
7  * Unless required by applicable law or agreed to in writing, software distributed under the License
8  * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
9  * or implied. See the License for the specific language governing permissions and limitations under
10  * the License.
11  ******************************************************************************/
12 package org.onap.msb.sdk.example.springboot.model;
13
14 import java.io.Serializable;
15
16 import com.fasterxml.jackson.annotation.JsonProperty;
17
18 public class Employee implements Serializable {
19          
20         private static final long serialVersionUID = 1L;
21
22     @JsonProperty
23     private Integer id;
24     
25     @JsonProperty
26     private String firstName;
27     
28     @JsonProperty
29     private String lastName;
30
31     @JsonProperty
32     private String email;
33      
34     public Employee() {}
35
36     public Employee(Integer id, String firstName, String lastName, String email) {
37         //super();
38         this.id = id;
39         this.firstName = firstName;
40         this.lastName = lastName;
41         this.email = email;
42     }
43     
44     public Integer getId() {
45         return id;
46     }
47     public void setId(Integer id) {
48         this.id = id;
49     }
50     public String getFirstName() {
51         return firstName;
52     }
53     public void setFirstName(String firstName) {
54         this.firstName = firstName;
55     }
56     public String getLastName() {
57         return lastName;
58     }
59     public void setLastName(String lastName) {
60         this.lastName = lastName;
61     }
62     public String getEmail() {
63         return email;
64     }
65     public void setEmail(String email) {
66         this.email = email;
67     }
68  
69     @Override
70     public String toString() {
71         return "Employee [id=" + id + ", firstName=" + firstName
72                 + ", lastName=" + lastName + ", email=" + email + "]";
73     }
74 }