]> git.mxchange.org Git - jproduct-core.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Sun, 19 Apr 2020 06:17:39 +0000 (08:17 +0200)
committerRoland Häder <roland@mxchange.org>
Sun, 19 Apr 2020 07:10:04 +0000 (09:10 +0200)
- renamed productCreated to productEntryCreated
- added property productEntryUpdated

Signed-off-by: Roland Häder <roland@mxchange.org>
src/org/mxchange/jproduct/model/product/GenericProduct.java
src/org/mxchange/jproduct/model/product/Product.java

index ec94a225da7786a65db6fed33739646e5a7220f7..6ff6e9ef4be72bed4803a9434973212349761ef2 100644 (file)
@@ -107,20 +107,27 @@ public class GenericProduct implements Product {
        @OneToOne (targetEntity = ProductCategory.class, cascade = CascadeType.REFRESH, optional = false)
        private Category productCategory;
 
+       /**
+        * Currency code for both prices, like EUR or USD
+        */
+       @Basic (optional = false)
+       @Column (name = "product_currency_code", nullable = false, length = 3)
+       private String productCurrencyCode;
+
        /**
         * When this product has been created
         */
        @Basic (optional = false)
-       @Column (name = "product_created", nullable = false, updatable = false)
+       @Column (name = "product_entry_created", nullable = false, updatable = false)
        @Temporal (TemporalType.TIMESTAMP)
-       private Date productCreated;
+       private Date productEntryCreated;
 
        /**
-        * Currency code for both prices, like EUR or USD
+        * When this product has been created
         */
-       @Basic (optional = false)
-       @Column (name = "product_currency_code", nullable = false, length = 3)
-       private String productCurrencyCode;
+       @Column (name = "product_entry_updated", insertable = false)
+       @Temporal (TemporalType.TIMESTAMP)
+       private Date productEntryUpdated;
 
        /**
         * Gross price of product
@@ -382,26 +389,38 @@ public class GenericProduct implements Product {
                this.productCategory = productCategory;
        }
 
+       @Override
+       public String getProductCurrencyCode () {
+               return this.productCurrencyCode;
+       }
+
+       @Override
+       public void setProductCurrencyCode (final String productCurrencyCode) {
+               this.productCurrencyCode = productCurrencyCode;
+       }
+
        @Override
        @SuppressWarnings ("ReturnOfDateField")
-       public Date getProductCreated () {
-               return this.productCreated;
+       public Date getProductEntryCreated () {
+               return this.productEntryCreated;
        }
 
        @Override
        @SuppressWarnings ("AssignmentToDateFieldFromParameter")
-       public void setProductCreated (final Date productCreated) {
-               this.productCreated = productCreated;
+       public void setProductEntryCreated (final Date productEntryCreated) {
+               this.productEntryCreated = productEntryCreated;
        }
 
        @Override
-       public String getProductCurrencyCode () {
-               return this.productCurrencyCode;
+       @SuppressWarnings ("ReturnOfDateField")
+       public Date getProductEntryUpdated () {
+               return this.productEntryUpdated;
        }
 
        @Override
-       public void setProductCurrencyCode (final String productCurrencyCode) {
-               this.productCurrencyCode = productCurrencyCode;
+       @SuppressWarnings ("AssignmentToDateFieldFromParameter")
+       public void setProductEntryUpdated (final Date productEntryUpdated) {
+               this.productEntryUpdated = productEntryUpdated;
        }
 
        @Override
index 2dce9d7fe48346019cf39d899f236998982dab6b..e14ef94ca2336d3968e139a65ff7f56883bdb93b 100644 (file)
@@ -49,14 +49,28 @@ public interface Product extends Comparable<Product>, Serializable {
         * <p>
         * @return Created timestamp
         */
-       Date getProductCreated ();
+       Date getProductEntryCreated ();
 
        /**
         * Setter for created timestamp
         * <p>
-        * @param productCreated Created timestamp
+        * @param productEntryCreated Created timestamp
         */
-       void setProductCreated (final Date productCreated);
+       void setProductEntryCreated (final Date productEntryCreated);
+
+       /**
+        * Getter for updated timestamp
+        * <p>
+        * @return Updated timestamp
+        */
+       Date getProductEntryUpdated ();
+
+       /**
+        * Setter for updated timestamp
+        * <p>
+        * @param productEntryUpdated Updated timestamp
+        */
+       void setProductEntryUpdated (final Date productEntryCreated);
 
        /**
         * Getter for product availability