FileDocCategorySizeDatePackage
LineItem.javaAPI DocExample1518Thu Jan 01 16:34:00 GMT 2004org.springframework.samples.jpetstore.domain

LineItem

public class LineItem extends Object implements Serializable

Fields Summary
private int
orderId
private int
lineNumber
private int
quantity
private String
itemId
private double
unitPrice
private Item
item
Constructors Summary
public LineItem()

  
public LineItem(int lineNumber, CartItem cartItem)

    this.lineNumber = lineNumber;
    this.quantity = cartItem.getQuantity();
    this.itemId = cartItem.getItem().getItemId();
    this.unitPrice = cartItem.getItem().getListPrice();
    this.item = cartItem.getItem();
  
Methods Summary
public ItemgetItem()

 return item; 
public java.lang.StringgetItemId()

 return itemId; 
public intgetLineNumber()

 return lineNumber; 
public intgetOrderId()

 return orderId; 
public intgetQuantity()

 return quantity; 
public doublegetTotalPrice()

		return this.unitPrice * this.quantity;
	
public doublegetUnitPrice()

 return unitPrice; 
public voidsetItem(Item item)

    this.item = item;
  
public voidsetItemId(java.lang.String itemId)

 this.itemId = itemId; 
public voidsetLineNumber(int lineNumber)

 this.lineNumber = lineNumber; 
public voidsetOrderId(int orderId)

 this.orderId = orderId; 
public voidsetQuantity(int quantity)

    this.quantity = quantity;
  
public voidsetUnitPrice(double unitprice)

 this.unitPrice = unitprice;