@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Sale sale = (Sale) o; return Objects.equals(id, sale.id); }
@Override public int hashCode() { return Objects.hashCode(id); }