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