From: Roland Haeder Date: Thu, 24 Sep 2015 09:26:54 +0000 (+0200) Subject: java.sql.Timestamp is sadly not available in JPA ... :-( Losing type-safety here ... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=340fe236f1fa179fe10a2e7c181e29ebdfd20010;p=jcore.git java.sql.Timestamp is sadly not available in JPA ... :-( Losing type-safety here ... Signed-off-by:Roland Häder --- 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); }