]> git.mxchange.org Git - jshop-core.git/blobdiff - src/org/mxchange/jshopcore/model/basket/items/BasketItem.java
renamed even more fields/attributes
[jshop-core.git] / src / org / mxchange / jshopcore / model / basket / items / BasketItem.java
index d6cf05c775a6ff9ae3f18108370303aec7d7c685..5cb551de0ec75db93216ea247f923725eb3d897d 100644 (file)
@@ -44,11 +44,11 @@ public class BasketItem extends BaseItem implements AddableBasketItem {
        private static final long serialVersionUID = 52_749_158_492_581_578L;
 
        /**
-        * Item amount
+        * Item orderedAmount
         */
        @Basic (optional = false)
-       @Column (name = "amount", nullable = false, length = 20)
-       private Long amount;
+       @Column (name = "ordered_amount", nullable = false, length = 20)
+       private Long orderedAmount;
 
        /**
         * Entry itemId (from database backend)
@@ -70,7 +70,7 @@ public class BasketItem extends BaseItem implements AddableBasketItem {
         */
        @JoinColumn (name = "product_id", updatable = false)
        @OneToOne (targetEntity = GenericProduct.class)
-       private Product product;
+       private Product itemProduct;
 
        /**
         * Default constructor
@@ -87,7 +87,7 @@ public class BasketItem extends BaseItem implements AddableBasketItem {
                // Call default constructor
                this();
 
-               // product must not be null
+               // itemProduct must not be null
                if (null == product) {
                        // Abort here
                        throw new NullPointerException("product is null"); //NOI18N
@@ -97,37 +97,37 @@ public class BasketItem extends BaseItem implements AddableBasketItem {
                this.itemType = "product"; //NOI18N
 
                // Copy instance
-               this.product = product;
+               this.itemProduct = product;
        }
 
        /**
-        * Constructor for an item from given Product instance and amount.
+        * Constructor for an item from given Product instance and orderedAmount.
         *
         * @param product Product instance
-        * @param amount Ordered amount
+        * @param amount Ordered orderedAmount
         */
        public BasketItem (final Product product, final Long amount) {
                // Other constructor
                this(product);
 
-               // amount must not be null
+               // orderedAmount must not be null
                if (null == amount) {
                        // Abort here
                        throw new NullPointerException("amount is null"); //NOI18N
                }
 
-               // Set amount
-               this.amount = amount;
+               // Set orderedAmount
+               this.orderedAmount = amount;
        }
 
        @Override
-       public Long getAmount () {
-               return this.amount;
+       public Long getOrderedAmount () {
+               return this.orderedAmount;
        }
 
        @Override
-       public void setAmount (final Long amount) {
-               this.amount = amount;
+       public void setOrderedAmount (final Long orderedAmount) {
+               this.orderedAmount = orderedAmount;
        }
 
        @Override
@@ -151,12 +151,12 @@ public class BasketItem extends BaseItem implements AddableBasketItem {
        }
 
        @Override
-       public Product getProduct () {
-               return this.product;
+       public Product getItemProduct () {
+               return this.itemProduct;
        }
 
        @Override
-       public void setProduct (final Product product) {
-               this.product = product;
+       public void setItemProduct (final Product itemProduct) {
+               this.itemProduct = itemProduct;
        }
 }