View Javadoc
1   /**
2    *    Copyright 2009-2019 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    *       http://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  
17  package org.apache.ibatis.submitted.keygen;
18  
19  // See gh-1719
20  public class NpeCountry {
21    private Integer id;
22    private String countryname;
23    private String countrycode;
24  
25    public NpeCountry() {
26    }
27  
28    public NpeCountry(String countryname, String countrycode) {
29      this.countryname = countryname;
30      this.countrycode = countrycode;
31    }
32  
33    public Integer getId() {
34      return id;
35    }
36  
37    public void setId(Integer id) {
38      this.id = id;
39    }
40  
41    public String getCountryname() {
42      return countryname;
43    }
44  
45    public void setCountryname(String countryname) {
46      this.countryname = countryname;
47    }
48  
49    public String getCountrycode() {
50      return countrycode;
51    }
52  
53    public void setCountrycode(String countrycode) {
54      this.countrycode = countrycode;
55    }
56  
57    @Override
58    public boolean equals(Object o) {
59      if (this == o) {
60        return true;
61      }
62      if (o == null || getClass() != o.getClass()) {
63        return false;
64      }
65      NpeCountry../../../../org/apache/ibatis/submitted/keygen/NpeCountry.html#NpeCountry">NpeCountry other = (NpeCountry) o;
66      // throws NPE when id is null
67      return id.equals(other.id);
68    }
69  
70    @Override
71    public int hashCode() {
72      // throws NPE when id is null
73      return id.hashCode();
74    }
75  }