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_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{" +
38          "id=" + id +
39          ", username='" + username + '\'' +
40          ", roles=" + roles +
41          '}';
42    }
43  
44    public Integer getId() {
45      return id;
46    }
47  
48    public void setId(Integer id) {
49      this.id = id;
50    }
51  
52    public String getUsername() {
53      return username;
54    }
55  
56    public void setUsername(String username) {
57      this.username = username;
58    }
59  
60    public List<Role> getRoles() {
61      return roles;
62    }
63  
64    public void setRoles(List<Role> roles) {
65      this.roles = roles;
66    }
67  
68    public List<User> getTeachers() {
69      return teachers;
70    }
71  
72    public void setTeachers(List<User> teachers) {
73      this.teachers = teachers;
74    }
75  }