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.extendresultmap;
17  
18  import java.util.Objects;
19  
20  public class TestModel {
21  
22    private String a;
23    private String b;
24  
25    public TestModel() {
26    }
27  
28    public TestModel(String a, String b) {
29      this.a = a;
30      this.b = b;
31    }
32  
33    public String getA() {
34      return a;
35    }
36  
37    public void setA(String a) {
38      this.a = a;
39    }
40  
41    public String getB() {
42      return b;
43    }
44  
45    public void setB(String b) {
46      this.b = b;
47    }
48  
49    @Override
50    public int hashCode() {
51      return Objects.hash(a, b);
52    }
53  
54    @Override
55    public boolean equals(Object obj) {
56      if (this == obj) {
57        return true;
58      }
59      if ((obj == null) || (getClass() != obj.getClass())) {
60        return false;
61      }
62      TestModel other = (TestModel) obj;
63      if (!Objects.equals(a, other.a)) {
64        return false;
65      }
66      if (!Objects.equals(b, other.b)) {
67        return false;
68      }
69      return true;
70    }
71  
72    @Override
73    public String toString() {
74      return "TestModel [a=" + a + ", b=" + b + "]";
75    }
76  }