1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.ibatis.submitted.annotion_many_one_add_resultmapid;
17
18 import java.util.List;
19
20 public class User {
21 private Integer id;
22 private String username;
23 private List<User> teachers;
24 private Role role;
25 private List<Role> roles;
26
27 public Role getRole() {
28 return role;
29 }
30
31 public void setRole(Role role) {
32 this.role = role;
33 }
34
35 @Override
36 public String toString() {
37 return "User{" + "id=" + id + ", username='" + username + '\'' + ", roles=" + roles + '}';
38 }
39
40 public Integer getId() {
41 return id;
42 }
43
44 public void setId(Integer id) {
45 this.id = id;
46 }
47
48 public String getUsername() {
49 return username;
50 }
51
52 public void setUsername(String username) {
53 this.username = username;
54 }
55
56 public List<Role> getRoles() {
57 return roles;
58 }
59
60 public void setRoles(List<Role> roles) {
61 this.roles = roles;
62 }
63
64 public List<User> getTeachers() {
65 return teachers;
66 }
67
68 public void setTeachers(List<User> teachers) {
69 this.teachers = teachers;
70 }
71 }