View Javadoc
1   /*
2    *    Copyright 2009-2023 the original author or authors.
3    *
4    *    Licensed under the Apache License, Version 2.0 (the "License");
5    *    you may not use this file except in compliance with the License.
6    *    You may obtain a copy of the License at
7    *
8    *       https://www.apache.org/licenses/LICENSE-2.0
9    *
10   *    Unless required by applicable law or agreed to in writing, software
11   *    distributed under the License is distributed on an "AS IS" BASIS,
12   *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   *    See the License for the specific language governing permissions and
14   *    limitations under the License.
15   */
16  package org.apache.ibatis.submitted.annotion_many_one_add_columnprefix;
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    private User friend;
27  
28    public Role getRole() {
29      return role;
30    }
31  
32    public void setRole(Role role) {
33      this.role = role;
34    }
35  
36    @Override
37    public String toString() {
38      return "User{" + "id=" + id + ", username='" + username + '\'' + ", roles=" + roles + '}';
39    }
40  
41    public Integer getId() {
42      return id;
43    }
44  
45    public void setId(Integer id) {
46      this.id = id;
47    }
48  
49    public String getUsername() {
50      return username;
51    }
52  
53    public void setUsername(String username) {
54      this.username = username;
55    }
56  
57    public List<Role> getRoles() {
58      return roles;
59    }
60  
61    public void setRoles(List<Role> roles) {
62      this.roles = roles;
63    }
64  
65    public List<User> getTeachers() {
66      return teachers;
67    }
68  
69    public void setTeachers(List<User> teachers) {
70      this.teachers = teachers;
71    }
72  
73    public User getFriend() {
74      return friend;
75    }
76  
77    public void setFriend(User friend) {
78      this.friend = friend;
79    }
80  }