1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.ibatis.submitted.extendresultmap;
17
18 public class TestModel {
19
20 private String a;
21 private String b;
22
23 public TestModel() {
24 }
25
26 public TestModel(String a, String b) {
27 super();
28 this.a = a;
29 this.b = b;
30 }
31
32 public String getA() {
33 return a;
34 }
35
36 public void setA(String a) {
37 this.a = a;
38 }
39
40 public String getB() {
41 return b;
42 }
43
44 public void setB(String b) {
45 this.b = b;
46 }
47
48 @Override
49 public int hashCode() {
50 final int prime = 31;
51 int result = 1;
52 result = prime * result + ((a == null) ? 0 : a.hashCode());
53 result = prime * result + ((b == null) ? 0 : b.hashCode());
54 return result;
55 }
56
57 @Override
58 public boolean equals(Object obj) {
59 if (this == obj)
60 return true;
61 if (obj == null)
62 return false;
63 if (getClass() != obj.getClass())
64 return false;
65 TestModel other = (TestModel) obj;
66 if (a == null) {
67 if (other.a != null)
68 return false;
69 } else if (!a.equals(other.a))
70 return false;
71 if (b == null) {
72 if (other.b != null)
73 return false;
74 } else if (!b.equals(other.b))
75 return false;
76 return true;
77 }
78
79 @Override
80 public String toString() {
81 return "TestModel [a=" + a + ", b=" + b + "]";
82 }
83 }