]> git.mxchange.org Git - jcustomer-core.git/commitdiff
renamed attributes and database fields to fit with naming convention
authorRoland Haeder <roland@mxchange.org>
Wed, 24 Feb 2016 16:31:03 +0000 (17:31 +0100)
committerRoland Haeder <roland@mxchange.org>
Wed, 24 Feb 2016 16:31:03 +0000 (17:31 +0100)
src/org/mxchange/jshopcore/model/order/items/OrderItem.java

index 4ddb964c41e40e7c7cb27edbb8be90b7bcba59df..f16c66051842bde2f60e3fbde2eb2ce1456659a2 100644 (file)
@@ -49,28 +49,28 @@ public class OrderItem extends BaseItem implements AddableBasketItem, Comparable
         * Item amount
         */
        @Basic (optional = false)
-       @Column (name = "amount", length = 20, nullable = false)
-       private Long amount;
+       @Column (name = "order_amount", length = 20, nullable = false)
+       private Long orderedAmount;
 
        /**
         * Entry id (from database backend)
         */
        @Id
        @GeneratedValue (strategy = GenerationType.IDENTITY)
-       @Column (name = "id", nullable = false, length = 20)
-       private Long id;
+       @Column (name = "order_id", nullable = false, length = 20)
+       private Long itemId;
 
        /**
         * Item type
         */
        @Basic (optional = false)
-       @Column (name = "item_type", length = 20)
+       @Column (name = "order_item_type", length = 20)
        private String itemType;
 
        /**
         * Product instance
         */
-       @JoinColumn (name = "product_id", updatable = false)
+       @JoinColumn (name = "order_product_id", updatable = false)
        @OneToOne (targetEntity = GenericProduct.class, cascade = CascadeType.MERGE)
        private Product product;
 
@@ -82,12 +82,12 @@ public class OrderItem extends BaseItem implements AddableBasketItem, Comparable
 
        @Override
        public Long getItemId () {
-               return this.id;
+               return this.itemId;
        }
 
        @Override
-       public void setItemId (final Long id) {
-               this.id = id;
+       public void setItemId (final Long itemId) {
+               this.itemId = itemId;
        }
 
        @Override
@@ -112,11 +112,11 @@ public class OrderItem extends BaseItem implements AddableBasketItem, Comparable
 
        @Override
        public Long getOrderedAmount () {
-               return this.amount;
+               return this.orderedAmount;
        }
 
        @Override
-       public void setOrderedAmount (final Long amount) {
-               this.amount = amount;
+       public void setOrderedAmount (final Long orderedAmount) {
+               this.orderedAmount = orderedAmount;
        }
 }