01: package example;
02:
03: public class User {
04: private String _name;
05: private int _id;
06: private int _groupId;
07:
08: //
09: // JAXB requires a zero-argument constructor
10: //
11: public User() {
12: }
13:
14: public User(int id, int groupId, String name) {
15: _id = id;
16: _groupId = groupId;
17: _name = name;
18: }
19:
20: public String getName() {
21: return _name;
22: }
23:
24: public void setName(String name) {
25: _name = name;
26: }
27:
28: public int getId() {
29: return _id;
30: }
31:
32: public void setId(int id) {
33: _id = id;
34: }
35:
36: public int getGroupId() {
37: return _groupId;
38: }
39:
40: public void setGroupId(int groupId) {
41: _groupId = groupId;
42: }
43:
44: public String toString() {
45: return "User[id=" + _id + ", groupId=" + _groupId + ", name="
46: + _name + "]";
47: }
48: }
|