package com.richardradics.cleanaa.domain; /** * Created by radicsrichard on 15. 05. 14.. */ public class City { private Long id; private String name; private String country; public String getName() { return name; } public void setName(String name) { this.name = name; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getCountry() { return country; } public void setCountry(String country) { this.country = country; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; City city = (City) o; if (country != null ? !country.equals(city.country) : city.country != null) return false; if (id != null ? !id.equals(city.id) : city.id != null) return false; if (name != null ? !name.equals(city.name) : city.name != null) return false; return true; } @Override public int hashCode() { int result = id != null ? id.hashCode() : 0; result = 31 * result + (name != null ? name.hashCode() : 0); result = 31 * result + (country != null ? country.hashCode() : 0); return result; } @Override public String toString() { return "City{" + "id=" + id + ", name='" + name + '\'' + ", country='" + country + '\'' + '}'; } }