From: Roland Haeder Date: Thu, 24 Sep 2015 09:27:01 +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=a0d2c0c322d140424078c0a812fc294bdab54c67;p=jshop-core.git java.sql.Timestamp is sadly not available in JPA ... :-( Losing type-safety here ... Signed-off-by:Roland Häder --- diff --git a/lib/jcore.jar b/lib/jcore.jar index d986c5c..517bf91 100644 Binary files a/lib/jcore.jar and b/lib/jcore.jar differ diff --git a/src/org/mxchange/jshopcore/model/customer/Customer.java b/src/org/mxchange/jshopcore/model/customer/Customer.java index 559c112..d2b4f76 100644 --- a/src/org/mxchange/jshopcore/model/customer/Customer.java +++ b/src/org/mxchange/jshopcore/model/customer/Customer.java @@ -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 diff --git a/src/org/mxchange/jshopcore/model/customer/ShopCustomer.java b/src/org/mxchange/jshopcore/model/customer/ShopCustomer.java index bf3c2b5..954988a 100644 --- a/src/org/mxchange/jshopcore/model/customer/ShopCustomer.java +++ b/src/org/mxchange/jshopcore/model/customer/ShopCustomer.java @@ -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; } diff --git a/src/org/mxchange/jshopcore/model/order/Orderable.java b/src/org/mxchange/jshopcore/model/order/Orderable.java index 381c43e..fbd7136 100644 --- a/src/org/mxchange/jshopcore/model/order/Orderable.java +++ b/src/org/mxchange/jshopcore/model/order/Orderable.java @@ -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 diff --git a/src/org/mxchange/jshopcore/model/order/ShopOrder.java b/src/org/mxchange/jshopcore/model/order/ShopOrder.java index 814d8ab..d2e8bc6 100644 --- a/src/org/mxchange/jshopcore/model/order/ShopOrder.java +++ b/src/org/mxchange/jshopcore/model/order/ShopOrder.java @@ -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; }