Product extends AbstractHibernateObject implements SharedEntity, Linkable, Cloneable, Eventful,
    ProductInfo { public int getEntityVersion() { HashCodeBuilder builder = new HashCodeBuilder(37, 7) .append(this.id) .append(this.name) .append(this.multiplier) .append(this.attributes); int accumulator; if (!this.dependentProductIds.isEmpty()) { accumulator = 0; for (String pid : this.dependentProductIds) { accumulator += (pid != null ? pid.hashCode() : 0); } builder.append(accumulator); } if (!this.productContent.isEmpty()) { accumulator = 0; for (ProductContent pc : this.productContent) { accumulator += (pc != null ? pc.getEntityVersion() : 0); } builder.append(accumulator); } if (!this.branding.isEmpty()) { accumulator = 0; for (Branding branding : this.branding) { accumulator += (branding != null ? branding.hashCode() : 0); } builder.append(accumulator); } return builder.toHashCode(); } 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 testBaseEntityVersion() { Product lhs = new Product(); Product rhs = new Product(); assertEquals(lhs.getEntityVersion(), rhs.getEntityVersion()); }