]> git.mxchange.org Git - jproduct-core.git/commitdiff
added @Transient for serial numbers as they should not be persisted under any conditions
authorRoland Haeder <roland@mxchange.org>
Wed, 8 Jun 2016 18:02:21 +0000 (20:02 +0200)
committerRoland Haeder <roland@mxchange.org>
Wed, 8 Jun 2016 18:02:21 +0000 (20:02 +0200)
src/org/mxchange/jshopcore/model/basket/items/BasketItem.java
src/org/mxchange/jshopcore/model/category/ProductCategory.java
src/org/mxchange/jshopcore/model/order/ShopOrder.java
src/org/mxchange/jshopcore/model/order/items/OrderItem.java
src/org/mxchange/jshopcore/model/product/GenericProduct.java

index 6acdca73d0e39e62cfc62ad8b168151ae1b0bcfe..9eb82012ef9c41c87992410508f173d9356f64db 100644 (file)
@@ -26,6 +26,7 @@ import javax.persistence.Id;
 import javax.persistence.JoinColumn;
 import javax.persistence.OneToOne;
 import javax.persistence.Table;
+import javax.persistence.Transient;
 import org.mxchange.jshopcore.model.basket.AddableBasketItem;
 import org.mxchange.jshopcore.model.product.GenericProduct;
 import org.mxchange.jshopcore.model.product.Product;
@@ -37,11 +38,13 @@ import org.mxchange.jshopcore.model.product.Product;
  */
 @Entity (name = "basket_items")
 @Table (name = "basket_items")
+@SuppressWarnings ("PersistenceUnitPresent")
 public class BasketItem extends BaseItem implements AddableBasketItem {
 
        /**
         * Serial number
         */
+       @Transient
        private static final long serialVersionUID = 52_749_158_492_581_578L;
 
        /**
index dd7bd44d5106162170c48e025a09fceaeecc072f..aa4bb159146392f4fac6021b26548f0a1ee0ab77 100644 (file)
@@ -27,6 +27,7 @@ import javax.persistence.Id;
 import javax.persistence.JoinColumn;
 import javax.persistence.OneToOne;
 import javax.persistence.Table;
+import javax.persistence.Transient;
 
 /**
  * A product category
@@ -35,11 +36,13 @@ import javax.persistence.Table;
  */
 @Entity (name = "category")
 @Table (name = "category")
+@SuppressWarnings ("PersistenceUnitPresent")
 public class ProductCategory implements Category {
 
        /**
         * Serial number
         */
+       @Transient
        private static final long serialVersionUID = 21_458_945_712_659L;
 
        /**
index ce6d88fbc654e62c1f9845bce99e00d784562dde..1c2680f2eafabdac212a4f13312e7cda28d9fef2 100644 (file)
@@ -48,6 +48,7 @@ public class ShopOrder implements Orderable {
        /**
         * Serial number
         */
+       @Transient
        private static final long serialVersionUID = 19_728_938_459_834L;
 
        /**
index 14cac31159928b1bef480d2bc41ec25e3b5bcb07..c687fd07ffe7344dc6977d2ad069c4b4c84ecfb4 100644 (file)
@@ -28,6 +28,7 @@ import javax.persistence.Index;
 import javax.persistence.JoinColumn;
 import javax.persistence.OneToOne;
 import javax.persistence.Table;
+import javax.persistence.Transient;
 import org.mxchange.jshopcore.model.basket.AddableBasketItem;
 import org.mxchange.jshopcore.model.basket.items.BaseItem;
 import org.mxchange.jshopcore.model.product.GenericProduct;
@@ -45,11 +46,13 @@ import org.mxchange.jshopcore.model.product.Product;
                        @Index (name = "product", columnList = "order_product_id")
                }
 )
+@SuppressWarnings ("PersistenceUnitPresent")
 public class OrderItem extends BaseItem implements AddableBasketItem {
 
        /**
         * Serial number
         */
+       @Transient
        private static final long serialVersionUID = 44_189_562_738_723_581L;
 
        /**
index b1b18e9d3ce13a79d32e54a58d16cc4e87da5133..83db6c5b03aa89fb992ce471f1589f5bd5ddd06c 100644 (file)
@@ -27,6 +27,7 @@ import javax.persistence.Id;
 import javax.persistence.JoinColumn;
 import javax.persistence.OneToOne;
 import javax.persistence.Table;
+import javax.persistence.Transient;
 import org.mxchange.jshopcore.model.category.Category;
 import org.mxchange.jshopcore.model.category.ProductCategory;
 
@@ -38,11 +39,13 @@ import org.mxchange.jshopcore.model.category.ProductCategory;
  */
 @Entity (name = "products")
 @Table (name = "products")
+@SuppressWarnings ("PersistenceUnitPresent")
 public class GenericProduct implements Product {
 
        /**
         * Serial number
         */
+       @Transient
        private static final long serialVersionUID = 54_578_571_769_283L;
 
        /**