X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2Forg%2Fmxchange%2Fjshopcore%2Fmodel%2Fbasket%2Fitems%2FBasketItem.java;h=5cb551de0ec75db93216ea247f923725eb3d897d;hb=372d8438a9727498b709e318404fc1e6d1faa343;hp=d6cf05c775a6ff9ae3f18108370303aec7d7c685;hpb=e8f0175feb8e5dd1d5ba09054400f6df6b2f2804;p=jshop-core.git diff --git a/src/org/mxchange/jshopcore/model/basket/items/BasketItem.java b/src/org/mxchange/jshopcore/model/basket/items/BasketItem.java index d6cf05c..5cb551d 100644 --- a/src/org/mxchange/jshopcore/model/basket/items/BasketItem.java +++ b/src/org/mxchange/jshopcore/model/basket/items/BasketItem.java @@ -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; } }