1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.ibatis.executor.resultset;
17
18 import java.util.Objects;
19
20 import org.apache.ibatis.mapping.ResultMapping;
21
22
23
24
25
26
27
28 final class PendingCreationKey {
29 private final String resultMapId;
30 private final String constructorColumnPrefix;
31
32 PendingCreationKey(ResultMapping constructorMapping) {
33 this.resultMapId = constructorMapping.getNestedResultMapId();
34 this.constructorColumnPrefix = constructorMapping.getColumnPrefix();
35 }
36
37 String getConstructorColumnPrefix() {
38 return constructorColumnPrefix;
39 }
40
41 String getResultMapId() {
42 return resultMapId;
43 }
44
45 @Override
46 public boolean equals(Object o) {
47 if (this == o)
48 return true;
49 if (o == null || getClass() != o.getClass())
50 return false;
51
52 PendingCreationKey that = (PendingCreationKey) o;
53 return Objects.equals(resultMapId, that.resultMapId)
54 && Objects.equals(constructorColumnPrefix, that.constructorColumnPrefix);
55 }
56
57 @Override
58 public int hashCode() {
59 return Objects.hash(resultMapId, constructorColumnPrefix);
60 }
61
62 @Override
63 public String toString() {
64 return "PendingCreationKey{" + "resultMapId='" + resultMapId + '\'' + ", constructorColumnPrefix='"
65 + constructorColumnPrefix + '\'' + '}';
66 }
67 }