User.java
Download User.java
1: package com.wpollock.jaxbdemo;
2:
3: public class User {
4: private Long id;
5: private String name;
6: private String email;
7:
8: public User() {
9: }
10:
11: public User(Long id, String name, String email) {
12: this.id = id;
13: this.name = name;
14: this.email = email;
15: }
16:
17: public Long getId() {
18: return id;
19: }
20:
21: public User setId(Long id) {
22: this.id = id;
23: return this;
24: }
25:
26: public String getName() {
27: return name;
28: }
29:
30: public User setName(String name) {
31: this.name = name;
32: return this;
33: }
34:
35: public String getEmail() {
36: return email;
37: }
38:
39: public User setEmail(String email) {
40: this.email = email;
41: return this;
42: }
43:
44: @Override
45: public String toString() {
46: final StringBuffer sb = new StringBuffer("User{");
47: sb.append("id=").append(id);
48: sb.append(", name='").append(name).append('\'');
49: sb.append(", email='").append(email).append('\'');
50: sb.append('}');
51: return sb.toString();
52: }
53: }