@Column (name = "product_title", length = 100, nullable = false, unique = true)
private String productTitle;
+ /**
+ * Currency code for both prices
+ */
+ private String productCurrencyCode;
+
/**
* Default constructor
*/
* <p>
* @param productTitle Name of product
* @param productGrossPrice Product's gross price
+ * @param productCurrencyCode code for both prices
* @param productCategory Category instance
* @param productAvailability Availability (selectable by customer)
*/
- public GenericProduct (final String productTitle, final Float productGrossPrice, final Category productCategory, final Boolean productAvailability) {
+ public GenericProduct (final String productTitle, final Float productGrossPrice, final String productCurrencyCode, final Category productCategory, final Boolean productAvailability) {
// Set all here
this.productTitle = productTitle;
this.productGrossPrice = productGrossPrice;
+ this.productCurrencyCode = productCurrencyCode;
this.productCategory = productCategory;
this.productAvailability = productAvailability;
}
this.productCreated = productCreated;
}
+ @Override
+ public String getProductCurrencyCode () {
+ return this.productCurrencyCode;
+ }
+
+ @Override
+ public void setProductCurrencyCode (final String productCurrencyCode) {
+ this.productCurrencyCode = productCurrencyCode;
+ }
+
@Override
public Float getProductGrossPrice () {
return this.productGrossPrice;
*/
void setProductGrossPrice (final Float productGrossPrice);
+ /**
+ * Getter for currency code like EUR or USD
+ * <p>
+ * @return Currency code like EUR or USD
+ */
+ String getProductCurrencyCode ();
+
+ /**
+ * Setter for currency code like EUR or USD
+ * <p>
+ * @param productCurrencyCode Currency code like EUR or USD
+ */
+ void setProductCurrencyCode (final String productCurrencyCode);
+
/**
* Getter for title.
* <p>