From 3021e333f5dad39e6037689b1b252b2ae3d775d4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 22 Sep 2017 23:49:57 +0200 Subject: [PATCH] Continued: - need to change java.util.Calendar (bye bye) to java.util.Date in favour of PrimeFaces' p:calendar [!] MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../mxchange/jcontacts/model/contact/Contact.java | 9 ++++----- .../jcontacts/model/contact/UserContact.java | 13 ++++++------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/org/mxchange/jcontacts/model/contact/Contact.java b/src/org/mxchange/jcontacts/model/contact/Contact.java index 4eb2f5a..2d8eea3 100644 --- a/src/org/mxchange/jcontacts/model/contact/Contact.java +++ b/src/org/mxchange/jcontacts/model/contact/Contact.java @@ -17,7 +17,6 @@ package org.mxchange.jcontacts.model.contact; import java.io.Serializable; -import java.util.Calendar; import java.util.Date; import org.mxchange.jcontacts.model.contact.title.PersonalTitle; import org.mxchange.jcountry.model.data.Country; @@ -121,14 +120,14 @@ public interface Contact extends Serializable { *

* @return "created" timestamp */ - Calendar getContactCreated (); + Date getContactCreated (); /** * Setter for "created" timestamp *

* @param created "created" timestamp */ - void setContactCreated (final Calendar created); + void setContactCreated (final Date created); /** * Email address @@ -283,14 +282,14 @@ public interface Contact extends Serializable { *

* @return "updated" timestamp */ - Calendar getContactUpdated (); + Date getContactUpdated (); /** * Getter for "updated" timestamp *

* @param updated "updated" timestamp */ - void setContactUpdated (final Calendar updated); + void setContactUpdated (final Date updated); /** * ZIP code diff --git a/src/org/mxchange/jcontacts/model/contact/UserContact.java b/src/org/mxchange/jcontacts/model/contact/UserContact.java index 7554f46..fabba22 100644 --- a/src/org/mxchange/jcontacts/model/contact/UserContact.java +++ b/src/org/mxchange/jcontacts/model/contact/UserContact.java @@ -16,7 +16,6 @@ */ package org.mxchange.jcontacts.model.contact; -import java.util.Calendar; import java.util.Date; import java.util.Objects; import javax.persistence.Basic; @@ -116,7 +115,7 @@ public class UserContact implements Contact { @Basic (optional = false) @Temporal (TemporalType.TIMESTAMP) @Column (name = "contact_created", nullable = false) - private Calendar contactCreated; + private Date contactCreated; /** * Email address @@ -211,7 +210,7 @@ public class UserContact implements Contact { */ @Temporal (TemporalType.TIMESTAMP) @Column (name = "contact_updated") - private Calendar contactUpdated; + private Date contactUpdated; /** * ZIP code @@ -332,13 +331,13 @@ public class UserContact implements Contact { @Override @SuppressWarnings ("ReturnOfDateField") - public Calendar getContactCreated () { + public Date getContactCreated () { return this.contactCreated; } @Override @SuppressWarnings ("AssignmentToDateFieldFromParameter") - public void setContactCreated (final Calendar contactCreated) { + public void setContactCreated (final Date contactCreated) { this.contactCreated = contactCreated; } @@ -470,13 +469,13 @@ public class UserContact implements Contact { @Override @SuppressWarnings ("ReturnOfDateField") - public Calendar getContactUpdated () { + public Date getContactUpdated () { return this.contactUpdated; } @Override @SuppressWarnings ("AssignmentToDateFieldFromParameter") - public void setContactUpdated (final Calendar contactUpdated) { + public void setContactUpdated (final Date contactUpdated) { this.contactUpdated = contactUpdated; } -- 2.39.5