]> git.mxchange.org Git - jcore.git/commitdiff
Temporal values don't like strings, good!
authorRoland Haeder <roland@mxchange.org>
Thu, 24 Sep 2015 09:32:23 +0000 (11:32 +0200)
committerRoland Haeder <roland@mxchange.org>
Thu, 24 Sep 2015 09:32:23 +0000 (11:32 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

src/org/mxchange/jcore/model/contact/BaseContact.java
src/org/mxchange/jcore/model/contact/Contact.java

index 530a64f2e8c5ab78ff69bb51fd14981638dc142b..0f163b7faf9e89ae0d610219cc3acdb7b8c7bbbe 100644 (file)
@@ -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<Contact> {
        @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<Contact> {
         * 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<Contact> {
        }
 
        @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<Contact> {
        }
 
        @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;
        }
 
index f41d833a0533b750b51ff5e955b48ae2b93085cf..94f9b7fe05a126a609e36b6de0e60b660746086f 100644 (file)
@@ -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);
 }