From: Roland Haeder <roland@mxchange.org>
Date: Wed, 24 Feb 2016 16:31:03 +0000 (+0100)
Subject: renamed attributes and database fields to fit with naming convention
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b73afbbfc61f1666f3a9ad2cd23276e4d98afaa8;p=jshop-core.git

renamed attributes and database fields to fit with naming convention
---

diff --git a/src/org/mxchange/jshopcore/model/order/items/OrderItem.java b/src/org/mxchange/jshopcore/model/order/items/OrderItem.java
index 4ddb964..f16c660 100644
--- a/src/org/mxchange/jshopcore/model/order/items/OrderItem.java
+++ b/src/org/mxchange/jshopcore/model/order/items/OrderItem.java
@@ -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;
 	}
 }