@Temporal (TemporalType.TIMESTAMP)
private Date productCreated;
+ /**
+ * Currency code for both prices
+ */
+ private String productCurrencyCode;
+
/**
* Gross price of product
*/
private String productTitle;
/**
- * Currency code for both prices
+ * Amount of this product (for example 1 for 1 liter)
*/
- private String productCurrencyCode;
+ @Column (name = "product_unit_amount")
+ private Float productUnitAmount;
+
+ /**
+ * Unit type (for example liter)
+ */
+ @Column (name = "product_unit_type")
+ private String productUnitType;
/**
* Default constructor
this.productTitle = productTitle;
}
+ @Override
+ public Float getProductUnitAmount () {
+ return this.productUnitAmount;
+ }
+
+ @Override
+ public void setProductUnitAmount (final Float productUnitAmount) {
+ this.productUnitAmount = productUnitAmount;
+ }
+
+ @Override
+ public String getProductUnitType () {
+ return this.productUnitType;
+ }
+
+ @Override
+ public void setProductUnitType (final String productUnitType) {
+ this.productUnitType = productUnitType;
+ }
+
@Override
public int hashCode () {
int hash = 7;
*/
void setProductTitle (final String productTitle);
+ /**
+ * Getter for product's unit amount
+ * <p>
+ * @return Product's unit amount
+ */
+ Float getProductUnitAmount ();
+
+ /**
+ * Setter for product's unit amount
+ * <p>
+ * @param productUnitAmount Product's unit amount
+ */
+ void setProductUnitAmount (final Float productUnitAmount);
+
+ /**
+ * Getter for product's unit type
+ * <p>
+ * @return Product's unit type
+ */
+ String getProductUnitType ();
+
+ /**
+ * Setter for product's unit type
+ * <p>
+ * @param productUnitType Product's unit type
+ */
+ void setProductUnitType (final String productUnitType);
+
@Override
boolean equals (final Object object);