예제 #1
0
파일: City.java 프로젝트: jachenyp/web
 @Override
 public int hashCode() {
   int result = cityid != null ? cityid.hashCode() : 0;
   result = 31 * result + (province != null ? province.hashCode() : 0);
   result = 31 * result + (cityname != null ? cityname.hashCode() : 0);
   result = 31 * result + (citykey != null ? citykey.hashCode() : 0);
   result = 31 * result + (cityFlag != null ? cityFlag.hashCode() : 0);
   result = 31 * result + (zipcode != null ? zipcode.hashCode() : 0);
   result = 31 * result + (code != null ? code.hashCode() : 0);
   result = 31 * result + (areacode != null ? areacode.hashCode() : 0);
   result = 31 * result + (spellid != null ? spellid.hashCode() : 0);
   return result;
 }
예제 #2
0
파일: City.java 프로젝트: jachenyp/web
  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    City city = (City) o;

    if (areacode != null ? !areacode.equals(city.areacode) : city.areacode != null) return false;
    if (cityFlag != null ? !cityFlag.equals(city.cityFlag) : city.cityFlag != null) return false;
    if (cityid != null ? !cityid.equals(city.cityid) : city.cityid != null) return false;
    if (citykey != null ? !citykey.equals(city.citykey) : city.citykey != null) return false;
    if (cityname != null ? !cityname.equals(city.cityname) : city.cityname != null) return false;
    if (code != null ? !code.equals(city.code) : city.code != null) return false;
    if (province != null ? !province.equals(city.province) : city.province != null) return false;
    if (spellid != null ? !spellid.equals(city.spellid) : city.spellid != null) return false;
    if (zipcode != null ? !zipcode.equals(city.zipcode) : city.zipcode != null) return false;

    return true;
  }