public boolean equals(Object obj) {
if (obj == null) return false;
if (obj == this) return true;
if (Purchaser.class.isAssignableFrom(obj.getClass())) {
final Purchaser other = Purchaser.class.cast(obj);
return new EqualsBuilder().append(this.id, other.id)
.append(this.name, other.name)
.append(this.address, other.address)
.append(this.nip, other.nip).isEquals();
}
return false;