@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + (active ? 1231 : 1237); result = prime * result + customerId; result = prime * result + ((firstName == null) ? 0 : firstName.hashCode()); result = prime * result + ((lastName == null) ? 0 : lastName.hashCode()); result = prime * result + ((paddress == null) ? 0 : paddress.hashCode()); result = prime * result + ((store == null) ? 0 : store.hashCode()); return result; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Customer other = (Customer) obj; if (active != other.active) return false; if (customerId != other.customerId) return false; if (firstName == null) { if (other.firstName != null) return false; } else if (!firstName.equals(other.firstName)) return false; if (lastName == null) { if (other.lastName != null) return false; } else if (!lastName.equals(other.lastName)) return false; if (paddress == null) { if (other.paddress != null) return false; } else if (!paddress.equals(other.paddress)) return false; if (store == null) { if (other.store != null) return false; } else if (!store.equals(other.store)) return false; return true; }