@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Article other = (Article) obj; if (barcode == null) { if (other.barcode != null) return false; } else if (!barcode.equals(other.barcode)) return false; if (comment == null) { if (other.comment != null) return false; } else if (!comment.equals(other.comment)) return false; if (id == null) { if (other.id != null) return false; } else if (!id.equals(other.id)) return false; if (name == null) { if (other.name != null) return false; } else if (!name.equals(other.name)) return false; if (price == null) { if (other.price != null) return false; } else if (!price.equals(other.price)) return false; if (supplier == null) { if (other.supplier != null) return false; } else if (!supplier.equals(other.supplier)) return false; if (type == null) { if (other.type != null) return false; } else if (!type.equals(other.type)) return false; if (unit == null) { if (other.unit != null) return false; } else if (!unit.equals(other.unit)) return false; return true; }