1
2
3
4
5
6
7
8
9
10
11
12
13
14
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 }