diff options
Diffstat (limited to 'example-spring-boot/src/main/java/org/onap/boot/example/demo/model/Employee.java')
-rw-r--r-- | example-spring-boot/src/main/java/org/onap/boot/example/demo/model/Employee.java | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/example-spring-boot/src/main/java/org/onap/boot/example/demo/model/Employee.java b/example-spring-boot/src/main/java/org/onap/boot/example/demo/model/Employee.java new file mode 100644 index 0000000..b5cd629 --- /dev/null +++ b/example-spring-boot/src/main/java/org/onap/boot/example/demo/model/Employee.java @@ -0,0 +1,63 @@ +package org.onap.boot.example.demo.model; + +import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class Employee implements Serializable { + + private static final long serialVersionUID = 1L; + + @JsonProperty + private Integer id; + + @JsonProperty + private String firstName; + + @JsonProperty + private String lastName; + + @JsonProperty + private String email; + + public Employee() {} + + public Employee(Integer id, String firstName, String lastName, String email) { + //super(); + this.id = id; + this.firstName = firstName; + this.lastName = lastName; + this.email = email; + } + + public Integer getId() { + return id; + } + public void setId(Integer id) { + this.id = id; + } + public String getFirstName() { + return firstName; + } + public void setFirstName(String firstName) { + this.firstName = firstName; + } + public String getLastName() { + return lastName; + } + public void setLastName(String lastName) { + this.lastName = lastName; + } + public String getEmail() { + return email; + } + public void setEmail(String email) { + this.email = email; + } + + @Override + public String toString() { + return "Employee [id=" + id + ", firstName=" + firstName + + ", lastName=" + lastName + ", email=" + email + "]"; + } +}
\ No newline at end of file |