View Javadoc
1   /*
2    *    Copyright 2009-2022 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.lazy_properties;
17  
18  import java.util.List;
19  
20  public class User implements Cloneable {
21    private Integer id;
22    private String name;
23    private User lazy1;
24    private User lazy2;
25    private List<User> lazy3;
26    public int setterCounter;
27  
28    public Integer getId() {
29      return id;
30    }
31  
32    public void setId(Integer id) {
33      this.id = id;
34    }
35  
36    public String getName() {
37      return name;
38    }
39  
40    public void setName(String name) {
41      this.name = name;
42    }
43  
44    public User getLazy1() {
45      return lazy1;
46    }
47  
48    public void setLazy1(User lazy1) {
49      setterCounter++;
50      this.lazy1 = lazy1;
51    }
52  
53    public User getLazy2() {
54      return lazy2;
55    }
56  
57    public void setLazy2(User lazy2) {
58      setterCounter++;
59      this.lazy2 = lazy2;
60    }
61  
62    public List<User> getLazy3() {
63      return lazy3;
64    }
65  
66    public void setLazy3(List<User> lazy3) {
67      setterCounter++;
68      this.lazy3 = lazy3;
69    }
70  
71    public void trigger() {
72      // nop
73    }
74  
75    @Override
76    public Object clone() {
77      return new User();
78    }
79  }