View Javadoc
1   /*
2    *    Copyright 2009-2021 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    *       http://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{" +
39          "id=" + id +
40          ", username='" + username + '\'' +
41          ", roles=" + roles +
42          '}';
43    }
44  
45    public Integer getId() {
46      return id;
47    }
48  
49    public void setId(Integer id) {
50      this.id = id;
51    }
52  
53    public String getUsername() {
54      return username;
55    }
56  
57    public void setUsername(String username) {
58      this.username = username;
59    }
60  
61    public List<Role> getRoles() {
62      return roles;
63    }
64  
65    public void setRoles(List<Role> roles) {
66      this.roles = roles;
67    }
68  
69    public List<User> getTeachers() {
70      return teachers;
71    }
72  
73    public void setTeachers(List<User> teachers) {
74      this.teachers = teachers;
75    }
76  
77    public User getFriend() {
78      return friend;
79    }
80  
81    public void setFriend(User friend) {
82      this.friend = friend;
83    }
84  }