@Column (name = "product_availability", nullable = false)
private Boolean productAvailability;
+ /**
+ * Bar-code number
+ */
+ @Column (name = "product_barcode_number")
+ private String productBarCodeNumber;
+
/**
* Product productCategory
*/
final int comparators[] = {
// First check product number
SafeNumberUtils.compare(this.getProductNumber(), product.getProductNumber()),
+ // ... bar-code number
+ StringUtils.compare(this.getProductBarCodeNumber(), product.getProductBarCodeNumber()),
// ... size
StringUtils.compare(this.getProductSize(), product.getProductSize()),
// ... then i18n key
return false;
} else if (!Objects.equals(this.getProductSize(), product.getProductSize())) {
return false;
+ } else if (!Objects.equals(this.getProductBarCodeNumber(), product.getProductBarCodeNumber())) {
+ return false;
}
return true;
this.productAvailability = productAvailability;
}
+ @Override
+ public String getProductBarCodeNumber () {
+ return this.productBarCodeNumber;
+ }
+
+ @Override
+ public void setProductBarCodeNumber (final String productBarCodeNumber) {
+ this.productBarCodeNumber = productBarCodeNumber;
+ }
+
@Override
public Category getProductCategory () {
return this.productCategory;
hash = 23 * hash + Objects.hashCode(this.getProductI18nKey());
hash = 23 * hash + Objects.hashCode(this.getProductAgeGroup());
hash = 23 * hash + Objects.hashCode(this.getProductSize());
+ hash = 23 * hash + Objects.hashCode(this.getProductBarCodeNumber());
return hash;
}
*/
public interface Product extends Comparable<Product>, Serializable {
+ /**
+ * Getter for bar-code number
+ * <p>
+ * @return Bar-code number
+ */
+ String getProductBarCodeNumber ();
+
+ /**
+ * Setter for bar-code number
+ * <p>
+ * @param productBarCodeNumber Bar-code number
+ */
+ void setProductBarCodeNumber (final String productBarCodeNumber);
+
/**
* Getter for created timestamp
* <p>
// Copy all:
targetProduct.setProductAgeGroup(sourceProduct.getProductAgeGroup());
targetProduct.setProductAvailability(sourceProduct.getProductAvailability());
+ targetProduct.setProductBarCodeNumber(sourceProduct.getProductBarCodeNumber());
targetProduct.setProductCategory(sourceProduct.getProductCategory());
targetProduct.setProductCurrencyCode(sourceProduct.getProductCurrencyCode());
targetProduct.setProductGrossPrice(sourceProduct.getProductGrossPrice());