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_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  }