From 340fe236f1fa179fe10a2e7c181e29ebdfd20010 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Thu, 24 Sep 2015 11:26:54 +0200 Subject: [PATCH] =?utf8?q?java.sql.Timestamp=20is=20sadly=20not=20availabl?= =?utf8?q?e=20in=20JPA=20...=20:-(=20Losing=20type-safety=20here=20...=20S?= =?utf8?q?igned-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, 10 insertions(+), 12 deletions(-) diff --git a/src/org/mxchange/jcore/model/contact/BaseContact.java b/src/org/mxchange/jcore/model/contact/BaseContact.java index 7ec512f..530a64f 100644 --- a/src/org/mxchange/jcore/model/contact/BaseContact.java +++ b/src/org/mxchange/jcore/model/contact/BaseContact.java @@ -16,7 +16,6 @@ */ package org.mxchange.jcore.model.contact; -import java.sql.Timestamp; import java.util.Date; import java.util.Objects; import javax.annotation.PostConstruct; @@ -92,7 +91,7 @@ public abstract class BaseContact implements Contact, Comparable { @Basic(optional = false) @Temporal (TemporalType.TIMESTAMP) @Column(nullable = false) - private Timestamp created; + private String created; /** * Email address @@ -162,7 +161,7 @@ public abstract class BaseContact implements Contact, Comparable { * When the contact has been updated */ @Temporal (TemporalType.TIMESTAMP) - private Timestamp updated; + private String updated; /** * ZIP code @@ -314,12 +313,12 @@ public abstract class BaseContact implements Contact, Comparable { } @Override - public Timestamp getCreated () { + public String getCreated () { return this.created; } @Override - public void setCreated (final Timestamp created) { + public void setCreated (final String created) { this.created = created; } @@ -420,12 +419,12 @@ public abstract class BaseContact implements Contact, Comparable { } @Override - public Timestamp getUpdated () { + public String getUpdated () { return this.updated; } @Override - public void setUpdated (final Timestamp updated) { + public void setUpdated (final String 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 19a5bbd..f41d833 100644 --- a/src/org/mxchange/jcore/model/contact/Contact.java +++ b/src/org/mxchange/jcore/model/contact/Contact.java @@ -17,7 +17,6 @@ package org.mxchange.jcore.model.contact; import java.io.Serializable; -import java.sql.Timestamp; import java.util.Date; import org.mxchange.jcore.model.contact.gender.Gender; @@ -276,26 +275,26 @@ public interface Contact extends Serializable { * * @return "created" timestamp */ - public Timestamp getCreated (); + public String getCreated (); /** * Setter for "created" timestamp * * @param created "created" timestamp */ - public void setCreated (final Timestamp created); + public void setCreated (final String created); /** * Getter for "updated" timestamp * * @return "updated" timestamp */ - public Timestamp getUpdated (); + public String getUpdated (); /** * Getter for "updated" timestamp * * @param updated "updated" timestamp */ - public void setUpdated (final Timestamp updated); + public void setUpdated (final String updated); } -- 2.39.5