From b16fd8af48882de3f73eaabac07b66c1ef09df59 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Fri, 18 Sep 2015 08:49:49 +0200 Subject: [PATCH] =?utf8?q?updated=20fields=20created=20and=20updated=20Sig?= =?utf8?q?ned-off-by:Roland=20H=C3=A4der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../jcore/model/contact/BaseContact.java | 33 ++++++++++++++++++- .../mxchange/jcore/model/contact/Contact.java | 29 ++++++++++++++++ 2 files changed, 61 insertions(+), 1 deletion(-) diff --git a/src/org/mxchange/jcore/model/contact/BaseContact.java b/src/org/mxchange/jcore/model/contact/BaseContact.java index f978e67..0fb4d49 100644 --- a/src/org/mxchange/jcore/model/contact/BaseContact.java +++ b/src/org/mxchange/jcore/model/contact/BaseContact.java @@ -16,6 +16,7 @@ */ package org.mxchange.jcore.model.contact; +import java.sql.Timestamp; import java.util.Objects; import org.mxchange.jcore.client.Client; import org.mxchange.jcore.model.contact.gender.Gender; @@ -26,12 +27,17 @@ import org.mxchange.jcore.model.contact.gender.Gender; * @author Roland Haeder * @version 0.0 */ -public abstract class BaseContact implements Contact, Comparable { +public class BaseContact implements Contact, Comparable { /** * Serial number */ private static final long serialVersionUID = 58_744_284_981_863L; + /** + * When the contact has been created + */ + private Timestamp created; + /** * Id number */ @@ -112,6 +118,11 @@ public abstract class BaseContact implements Contact, Comparable { */ private String street; + /** + * When the contact has been updated + */ + private Timestamp updated; + /** * ZIP code */ @@ -253,6 +264,16 @@ public abstract class BaseContact implements Contact, Comparable { this.companyName = companyName; } + @Override + public Timestamp getCreated () { + return this.created; + } + + @Override + public void setCreated (final Timestamp created) { + this.created = created; + } + /** * Id number * @return the id @@ -452,6 +473,16 @@ public abstract class BaseContact implements Contact, Comparable { this.street = street; } + @Override + public Timestamp getUpdated () { + return this.updated; + } + + @Override + public void setUpdated (final Timestamp updated) { + this.updated = updated; + } + /** * ZIP code * diff --git a/src/org/mxchange/jcore/model/contact/Contact.java b/src/org/mxchange/jcore/model/contact/Contact.java index 15d497e..33fbe37 100644 --- a/src/org/mxchange/jcore/model/contact/Contact.java +++ b/src/org/mxchange/jcore/model/contact/Contact.java @@ -17,6 +17,7 @@ package org.mxchange.jcore.model.contact; import java.io.Serializable; +import java.sql.Timestamp; import org.mxchange.jcore.model.contact.gender.Gender; /** @@ -260,4 +261,32 @@ public interface Contact extends Serializable { * @param ownContact Own contact */ public void setOwnContact (final Boolean ownContact); + + /** + * Getter for "created" timestamp + * + * @return "created" timestamp + */ + public Timestamp getCreated (); + + /** + * Setter for "created" timestamp + * + * @param created "created" timestamp + */ + public void setCreated (final Timestamp created); + + /** + * Getter for "updated" timestamp + * + * @return "updated" timestamp + */ + public Timestamp getUpdated (); + + /** + * Getter for "updated" timestamp + * + * @param updated "updated" timestamp + */ + public void setUpdated (final Timestamp updated); } -- 2.39.5