From 4f6a2d93ca4c824088efd04937dcc9e9eac089fc Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sat, 20 Feb 2016 22:07:26 +0100 Subject: [PATCH] resorted members --- .../model/basket/items/BasketItem.java | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/org/mxchange/jshopcore/model/basket/items/BasketItem.java b/src/org/mxchange/jshopcore/model/basket/items/BasketItem.java index 527031a..3dc05dc 100644 --- a/src/org/mxchange/jshopcore/model/basket/items/BasketItem.java +++ b/src/org/mxchange/jshopcore/model/basket/items/BasketItem.java @@ -44,13 +44,6 @@ public class BasketItem extends BaseItem implements AddableBasketItem { */ private static final long serialVersionUID = 52_749_158_492_581_578L; - /** - * Item orderedAmount - */ - @Basic (optional = false) - @Column (name = "ordered_amount", nullable = false, length = 20) - private Long orderedAmount; - /** * Entry itemId (from database backend) */ @@ -59,6 +52,13 @@ public class BasketItem extends BaseItem implements AddableBasketItem { @Column (name = "item_id", nullable = false, updatable = false) private Long itemId; + /** + * Product instance + */ + @JoinColumn (name = "product_id", updatable = false) + @OneToOne (targetEntity = GenericProduct.class, cascade = CascadeType.MERGE) + private Product itemProduct; + /** * Item type */ @@ -67,11 +67,11 @@ public class BasketItem extends BaseItem implements AddableBasketItem { private String itemType; /** - * Product instance + * Item orderedAmount */ - @JoinColumn (name = "product_id", updatable = false) - @OneToOne (targetEntity = GenericProduct.class, cascade = CascadeType.MERGE) - private Product itemProduct; + @Basic (optional = false) + @Column (name = "ordered_amount", nullable = false, length = 20) + private Long orderedAmount; /** * Default constructor @@ -122,23 +122,23 @@ public class BasketItem extends BaseItem implements AddableBasketItem { } @Override - public Long getOrderedAmount () { - return this.orderedAmount; + public Long getItemId () { + return this.itemId; } @Override - public void setOrderedAmount (final Long orderedAmount) { - this.orderedAmount = orderedAmount; + public void setItemId (final Long itemId) { + this.itemId = itemId; } @Override - public Long getItemId () { - return this.itemId; + public Product getItemProduct () { + return this.itemProduct; } @Override - public void setItemId (final Long itemId) { - this.itemId = itemId; + public void setItemProduct (final Product itemProduct) { + this.itemProduct = itemProduct; } @Override @@ -152,12 +152,12 @@ public class BasketItem extends BaseItem implements AddableBasketItem { } @Override - public Product getItemProduct () { - return this.itemProduct; + public Long getOrderedAmount () { + return this.orderedAmount; } @Override - public void setItemProduct (final Product itemProduct) { - this.itemProduct = itemProduct; + public void setOrderedAmount (final Long orderedAmount) { + this.orderedAmount = orderedAmount; } } -- 2.39.5