Add equals and hashCode methods based on ID