1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
package org.apache.camel.example.etl; |
18 |
|
|
19 |
|
import javax.persistence.Entity; |
20 |
|
import javax.persistence.GeneratedValue; |
21 |
|
import javax.persistence.Id; |
22 |
|
import javax.xml.bind.annotation.XmlAccessType; |
23 |
|
import javax.xml.bind.annotation.XmlAccessorType; |
24 |
|
import javax.xml.bind.annotation.XmlAttribute; |
25 |
|
import javax.xml.bind.annotation.XmlRootElement; |
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
@Entity(name = "Customer") |
33 |
|
@XmlRootElement(name = "customer") |
34 |
|
@XmlAccessorType(XmlAccessType.FIELD) |
35 |
0 |
public class CustomerEntity { |
36 |
|
@XmlAttribute |
37 |
|
private Long id; |
38 |
|
private String userName; |
39 |
|
private String firstName; |
40 |
|
private String surname; |
41 |
|
private String street; |
42 |
|
private String city; |
43 |
|
private String zip; |
44 |
|
private String phone; |
45 |
|
|
46 |
|
public String toString() { |
47 |
0 |
return "Customer[userName: " + userName + " firstName: " + firstName + " surname: " + surname + "]"; |
48 |
|
} |
49 |
|
|
50 |
|
@Id |
51 |
|
@GeneratedValue |
52 |
|
public Long getId() { |
53 |
0 |
return id; |
54 |
|
} |
55 |
|
|
56 |
|
public void setId(Long id) { |
57 |
0 |
this.id = id; |
58 |
0 |
} |
59 |
|
|
60 |
|
public String getCity() { |
61 |
0 |
return city; |
62 |
|
} |
63 |
|
|
64 |
|
public void setCity(String city) { |
65 |
0 |
this.city = city; |
66 |
0 |
} |
67 |
|
|
68 |
|
public String getFirstName() { |
69 |
0 |
return firstName; |
70 |
|
} |
71 |
|
|
72 |
|
public void setFirstName(String firstName) { |
73 |
0 |
this.firstName = firstName; |
74 |
0 |
} |
75 |
|
|
76 |
|
public String getPhone() { |
77 |
0 |
return phone; |
78 |
|
} |
79 |
|
|
80 |
|
public void setPhone(String phone) { |
81 |
0 |
this.phone = phone; |
82 |
0 |
} |
83 |
|
|
84 |
|
public String getStreet() { |
85 |
0 |
return street; |
86 |
|
} |
87 |
|
|
88 |
|
public void setStreet(String street) { |
89 |
0 |
this.street = street; |
90 |
0 |
} |
91 |
|
|
92 |
|
public String getSurname() { |
93 |
0 |
return surname; |
94 |
|
} |
95 |
|
|
96 |
|
public void setSurname(String surname) { |
97 |
0 |
this.surname = surname; |
98 |
0 |
} |
99 |
|
|
100 |
|
public String getUserName() { |
101 |
0 |
return userName; |
102 |
|
} |
103 |
|
|
104 |
|
public void setUserName(String userName) { |
105 |
0 |
this.userName = userName; |
106 |
0 |
} |
107 |
|
|
108 |
|
public String getZip() { |
109 |
0 |
return zip; |
110 |
|
} |
111 |
|
|
112 |
|
public void setZip(String zip) { |
113 |
0 |
this.zip = zip; |
114 |
0 |
} |
115 |
|
} |