]> git.mxchange.org Git - jcustomer-core.git/commitdiff
java.sql.Timestamp is sadly not available in JPA ... :-( Losing type-safety here ...
authorRoland Haeder <roland@mxchange.org>
Thu, 24 Sep 2015 09:27:01 +0000 (11:27 +0200)
committerRoland Haeder <roland@mxchange.org>
Thu, 24 Sep 2015 09:27:01 +0000 (11:27 +0200)
Signed-off-by:Roland Häder <roland@mxchange.org>

lib/jcore.jar
src/org/mxchange/jshopcore/model/customer/Customer.java
src/org/mxchange/jshopcore/model/customer/ShopCustomer.java
src/org/mxchange/jshopcore/model/order/Orderable.java
src/org/mxchange/jshopcore/model/order/ShopOrder.java

index d986c5ce567c99f0242ca974b739751489940945..517bf913c2095394e24e3a902b15b76c286cb704 100644 (file)
Binary files a/lib/jcore.jar and b/lib/jcore.jar differ
index 559c112f57ebf7c3738bbf3055dcd9f09e9629c4..d2b4f7662d74490f2765f2bcf2fcc60fffb415d4 100644 (file)
@@ -17,7 +17,6 @@
 package org.mxchange.jshopcore.model.customer;
 
 import java.io.Serializable;
-import java.sql.Timestamp;
 import org.mxchange.jcore.model.contact.Contact;
 
 /**
@@ -67,28 +66,28 @@ public interface Customer extends Serializable {
         *
         * @return "created" timestamp
         */
-       public Timestamp getCustomerCreated ();
+       public String getCustomerCreated ();
 
        /**
         * Setter for "created" timestamp
         *
         * @param customerCreated "created" timestamp
         */
-       public void setCustomerCreated (final Timestamp customerCreated);
+       public void setCustomerCreated (final String customerCreated);
 
        /**
         * Getter for "locked" timestamp
         *
         * @return "locked" timestamp
         */
-       public Timestamp getCustomerLocked ();
+       public String getCustomerLocked ();
 
        /**
         * Getter for "locked" timestamp
         *
         * @param customerLocked "locked" timestamp
         */
-       public void setCustomerLocked (final Timestamp customerLocked);
+       public void setCustomerLocked (final String customerLocked);
 
        /**
         * Setter for customer number
index bf3c2b58de84cea72a8bde51c0e2639b91d59d45..954988a8fb41d1bf368a01f1bc93676336103a10 100644 (file)
@@ -16,7 +16,6 @@
  */
 package org.mxchange.jshopcore.model.customer;
 
-import java.sql.Timestamp;
 import javax.persistence.Basic;
 import javax.persistence.Column;
 import javax.persistence.Entity;
@@ -73,14 +72,14 @@ public class ShopCustomer implements Customer {
        @Basic(optional = false)
        @Temporal (TemporalType.TIMESTAMP)
        @Column (name = "customer_created", nullable = false)
-       private Timestamp customerCreated;
+       private String customerCreated;
 
        /**
         * "locked" timestamp
         */
        @Temporal (TemporalType.TIMESTAMP)
        @Column (name = "customer_locked")
-       private Timestamp customerLocked;
+       private String customerLocked;
 
        /**
         * Customer number, this is different to the database entry customerId.
@@ -135,22 +134,22 @@ public class ShopCustomer implements Customer {
        }
 
        @Override
-       public Timestamp getCustomerCreated () {
+       public String getCustomerCreated () {
                return this.customerCreated;
        }
 
        @Override
-       public void setCustomerCreated (final Timestamp customerCreated) {
+       public void setCustomerCreated (final String customerCreated) {
                this.customerCreated = customerCreated;
        }
 
        @Override
-       public Timestamp getCustomerLocked () {
+       public String getCustomerLocked () {
                return this.customerLocked;
        }
 
        @Override
-       public void setCustomerLocked (final Timestamp customerLocked) {
+       public void setCustomerLocked (final String customerLocked) {
                this.customerLocked = customerLocked;
        }
 
index 381c43e2ded87e755c9afcf303ffeb86d5e41777..fbd713633643f77d061f58131bc415462ada4191 100644 (file)
@@ -17,7 +17,6 @@
 package org.mxchange.jshopcore.model.order;
 
 import java.io.Serializable;
-import java.sql.Timestamp;
 import java.util.List;
 import org.mxchange.jshopcore.model.basket.AddableBasketItem;
 import org.mxchange.jshopcore.model.customer.Customer;
@@ -76,14 +75,14 @@ public interface Orderable 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 list of ordered basket items
index 814d8ab779185ce87495ce1db380b4d154d5f28d..d2e8bc66eb45327fccd3d0d137bf14ae5ce8f74e 100644 (file)
@@ -16,7 +16,6 @@
  */
 package org.mxchange.jshopcore.model.order;
 
-import java.sql.Timestamp;
 import java.util.List;
 import javax.persistence.Basic;
 import javax.persistence.Column;
@@ -75,7 +74,7 @@ public class ShopOrder implements Orderable {
        @Basic (optional = false)
        @Temporal (TemporalType.TIMESTAMP)
        @Column (nullable = false)
-       private Timestamp created;
+       private String created;
 
        /**
         * Item list, don't save this
@@ -94,12 +93,12 @@ public class ShopOrder implements Orderable {
        }
 
        @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;
        }