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.foreach_map;
17  
18  import java.util.Objects;
19  
20  public class NestedBeanMapEntry {
21    public NestedBeanMapEntry() {
22    }
23  
24    public NestedBeanMapEntry(Integer keya, Boolean keyb, Integer valuea, Boolean valueb) {
25      this.keya = keya;
26      this.keyb = keyb;
27      this.valuea = valuea;
28      this.valueb = valueb;
29    }
30  
31    public Integer getKeya() {
32      return keya;
33    }
34  
35    public void setKeya(Integer keya) {
36      this.keya = keya;
37    }
38  
39    public Boolean getKeyb() {
40      return keyb;
41    }
42  
43    public void setKeyb(Boolean keyb) {
44      this.keyb = keyb;
45    }
46  
47    public Integer getValuea() {
48      return valuea;
49    }
50  
51    public void setValuea(Integer valuea) {
52      this.valuea = valuea;
53    }
54  
55    public Boolean getValueb() {
56      return valueb;
57    }
58  
59    public void setValueb(Boolean valueb) {
60      this.valueb = valueb;
61    }
62  
63    @Override
64    public boolean equals(Object o) {
65      if (this == o) {
66        return true;
67      }
68      if (o == null || getClass() != o.getClass()) {
69        return false;
70      }
71  
72      NestedBeanMapEntry map3Entry = (NestedBeanMapEntry) o;
73  
74      if (!Objects.equals(keya, map3Entry.keya) || !Objects.equals(keyb, map3Entry.keyb)
75          || !Objects.equals(valuea, map3Entry.valuea) || !Objects.equals(valueb, map3Entry.valueb)) {
76        return false;
77      }
78  
79      return true;
80    }
81  
82    @Override
83    public int hashCode() {
84      int result = keya != null ? keya.hashCode() : 0;
85      result = 31 * result + (valuea != null ? valuea.hashCode() : 0);
86      result = 31 * result + (keyb != null ? keyb.hashCode() : 0);
87      return 31 * result + (valueb != null ? valueb.hashCode() : 0);
88    }
89  
90    @Override
91    public String toString() {
92      return "NestedBeanMapEntry{" + "keya=" + keya + ", valuea=" + valuea + ", keyb=" + keyb + ", valueb=" + valueb
93          + '}';
94    }
95  
96    private Integer keya;
97    private Boolean keyb;
98    private Integer valuea;
99    private Boolean valueb;
100 }