From 58ecd41432017c9e2cfdf553be990aea61ef35d9 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Thu, 24 Sep 2015 11:32:23 +0200 Subject: [PATCH] =?utf8?q?Temporal=20values=20don't=20like=20strings,=20go?= =?utf8?q?od!=20Signed-off-by:Roland=20H=C3=A4der=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../mxchange/jcore/model/contact/BaseContact.java | 13 +++++++------ src/org/mxchange/jcore/model/contact/Contact.java | 9 +++++---- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/org/mxchange/jcore/model/contact/BaseContact.java b/src/org/mxchange/jcore/model/contact/BaseContact.java index 530a64f..0f163b7 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.util.Calendar; import java.util.Date; import java.util.Objects; import javax.annotation.PostConstruct; @@ -91,7 +92,7 @@ public abstract class BaseContact implements Contact, Comparable { @Basic(optional = false) @Temporal (TemporalType.TIMESTAMP) @Column(nullable = false) - private String created; + private Calendar created; /** * Email address @@ -161,7 +162,7 @@ public abstract class BaseContact implements Contact, Comparable { * When the contact has been updated */ @Temporal (TemporalType.TIMESTAMP) - private String updated; + private Calendar updated; /** * ZIP code @@ -313,12 +314,12 @@ public abstract class BaseContact implements Contact, Comparable { } @Override - public String getCreated () { + public Calendar getCreated () { return this.created; } @Override - public void setCreated (final String created) { + public void setCreated (final Calendar created) { this.created = created; } @@ -419,12 +420,12 @@ public abstract class BaseContact implements Contact, Comparable { } @Override - public String getUpdated () { + public Calendar getUpdated () { return this.updated; } @Override - public void setUpdated (final String updated) { + public void setUpdated (final Calendar updated) { this.updated = updated; } diff --git a/src/org/mxchange/jcore/model/contact/Contact.java b/src/org/mxchange/jcore/model/contact/Contact.java index f41d833..94f9b7f 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.util.Calendar; import java.util.Date; import org.mxchange.jcore.model.contact.gender.Gender; @@ -275,26 +276,26 @@ public interface Contact extends Serializable { * * @return "created" timestamp */ - public String getCreated (); + public Calendar getCreated (); /** * Setter for "created" timestamp * * @param created "created" timestamp */ - public void setCreated (final String created); + public void setCreated (final Calendar created); /** * Getter for "updated" timestamp * * @return "updated" timestamp */ - public String getUpdated (); + public Calendar getUpdated (); /** * Getter for "updated" timestamp * * @param updated "updated" timestamp */ - public void setUpdated (final String updated); + public void setUpdated (final Calendar updated); } -- 2.39.5