*/
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)
*/
@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
*/
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
}
@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
}
@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;
}
}