package se.kodapan.osm.sweden.ext.se.posten.postnummer;
import com.sleepycat.persist.model.KeyField;
import com.sleepycat.persist.model.Persistent;
/**
* @author kalle
* @since 2013-01-02 01:26
*/
@Persistent
public class PostenPostnummerServiceStreetAddressQuery {
public PostenPostnummerServiceStreetAddressQuery() {
}
public PostenPostnummerServiceStreetAddressQuery(String streetAddress, String city) {
this.streetAddress = streetAddress;
this.city = city;
}
@KeyField(1)
private String streetAddress;
@KeyField(2)
private String city;
public String getStreetAddress() {
return streetAddress;
}
public void setStreetAddress(String streetAddress) {
this.streetAddress = streetAddress;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
PostenPostnummerServiceStreetAddressQuery that = (PostenPostnummerServiceStreetAddressQuery) o;
if (city != null ? !city.equals(that.city) : that.city != null) return false;
if (streetAddress != null ? !streetAddress.equals(that.streetAddress) : that.streetAddress != null) return false;
return true;
}
@Override
public int hashCode() {
int result = streetAddress != null ? streetAddress.hashCode() : 0;
result = 31 * result + (city != null ? city.hashCode() : 0);
return result;
}
}