From: Roland Häder <roland@mxchange.org>
Date: Wed, 19 Dec 2018 19:07:52 +0000 (+0100)
Subject: Continued:
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=cb4c673b52401a78f218243097242867922857cb;p=jproduct-core.git

Continued:
- added categoryUpdated property

Signed-off-by: Roland Häder <roland@mxchange.org>
---

diff --git a/src/org/mxchange/jproduct/model/category/Category.java b/src/org/mxchange/jproduct/model/category/Category.java
index 9b916ba..4af172e 100644
--- a/src/org/mxchange/jproduct/model/category/Category.java
+++ b/src/org/mxchange/jproduct/model/category/Category.java
@@ -97,6 +97,20 @@ public interface Category extends Comparable<Category>, Serializable {
 	 */
 	void setCategoryI18nKey (final String title);
 
+	/**
+	 * Getter for updated timestamp
+	 * <p>
+	 * @return Updated timestamp
+	 */
+	Date getCategoryUpdated ();
+
+	/**
+	 * Setter for updated timestamp
+	 * <p>
+	 * @param categoryUpdated Updated timestamp
+	 */
+	void setCategoryUpdated (final Date categoryUpdated);
+
 	@Override
 	boolean equals (final Object object);
 
diff --git a/src/org/mxchange/jproduct/model/category/ProductCategory.java b/src/org/mxchange/jproduct/model/category/ProductCategory.java
index 195bdc6..0151345 100644
--- a/src/org/mxchange/jproduct/model/category/ProductCategory.java
+++ b/src/org/mxchange/jproduct/model/category/ProductCategory.java
@@ -86,6 +86,13 @@ public class ProductCategory implements Category {
 	@Column (name = "category_in_statistics", nullable = false)
 	private Boolean categoryShownInStatistics;
 
+	/**
+	 * When this entry has been created
+	 */
+	@Column (name = "category_updated")
+	@Temporal (TemporalType.TIMESTAMP)
+	private Date categoryUpdated;
+
 	/**
 	 * Parent category
 	 */
@@ -206,6 +213,18 @@ public class ProductCategory implements Category {
 		this.categoryShownInStatistics = categoryShownInStatistics;
 	}
 
+	@Override
+	@SuppressWarnings ("ReturnOfDateField")
+	public Date getCategoryUpdated () {
+		return this.categoryUpdated;
+	}
+
+	@Override
+	@SuppressWarnings ("AssignmentToDateFieldFromParameter")
+	public void setCategoryUpdated (final Date categoryUpdated) {
+		this.categoryUpdated = categoryUpdated;
+	}
+
 	@Override
 	public Category getParentCategory () {
 		return this.parentCategory;