Product extends AbstractHibernateObject implements SharedEntity, Linkable, Cloneable, Eventful,
    ProductInfo { @Override public boolean equals(Object obj) { if (this == obj) { return true; } boolean equals = false; if (obj instanceof Product) { Product that = (Product) obj; equals = new EqualsBuilder() .append(this.id, that.id) .append(this.name, that.name) .append(this.multiplier, that.multiplier) .append(this.attributes, that.attributes) .isEquals(); equals = equals && Util.collectionsAreEqual(this.dependentProductIds, that.dependentProductIds); equals = equals && Util.collectionsAreEqual(this.productContent, that.productContent, (pc1, pc2) -> Objects.equals(pc1, pc2) ? 0 : 1); equals = equals && Util.collectionsAreEqual(this.branding, that.branding, (b1, b2) -> Objects.equals(b1, b2) ? 0 : 1); } return equals; } Product();  Product(String productId, String name);  Product(String productId, String name, Long multiplier);  Product(String productId, String name, String variant, String version, String arch, String type);  Product(Product source); Product merge(Product source); @Override Object clone(); ProductData toDTO(); String getUuid(); void setUuid(String uuid); String getId(); void setId(String productId); String getName(); void setName(String name); Long getMultiplier(); void setMultiplier(Long multiplier); Map<String, String> getAttributes(); @XmlTransient String getAttributeValue(String key); @XmlTransient boolean hasAttribute(String key); Product setAttribute(String key, String value); boolean removeAttribute(String key); Product clearAttributes(); Product setAttributes(Map<String, String> attributes); Collection<Branding> getBranding(); Product setBranding(Collection<Branding> branding); boolean addBranding(Branding branding); boolean removeBranding(Branding branding); @XmlTransient List<String> getSkuEnabledContentIds(); @XmlTransient List<String> getSkuDisabledContentIds(); Collection<ProductContent> getProductContent(); ProductContent getProductContent(String contentId); boolean hasContent(String contentId); boolean addProductContent(ProductContent productContent); boolean addContent(Content content, boolean enabled); boolean removeContent(String contentId); boolean removeContent(Content content); boolean removeProductContent(ProductContent content); Product clearProductContent(); Product setProductContent(Collection<ProductContent> content); boolean modifies(String productId); Collection<String> getDependentProductIds(); boolean addDependentProductId(String productId); boolean removeDependentProductId(String productId); Product clearDependentProductIds(); Product setDependentProductIds(Collection<String> dependentProductIds); String getHref(); @Override String toString(); @XmlTransient @JsonIgnore Product setLocked(boolean locked); @XmlTransient boolean isLocked(); @Override boolean equals(Object obj); @Override int hashCode(); int getEntityVersion(); @PrePersist @PreUpdate void updateEntityVersion(); static final String DB_TABLE; }
@Test public void testBaseEquality() { Product lhs = new Product(); Product rhs = new Product(); assertFalse(lhs.equals(null)); assertTrue(lhs.equals(lhs)); assertTrue(rhs.equals(rhs)); assertTrue(lhs.equals(rhs)); assertTrue(rhs.equals(lhs)); }