package org.objectweb.jonas.stests.appli;

import java.io.Serializable;

/**
 * Utility class to hold one line of an order. 
 */
public class OrderDetail implements Serializable {

	//The ID of the item. should be six characters long e.g. '000001' 
	Integer itemID = null;

	// The total cost of the order line.  (i.e. qty * unit cost) 
	float itemAmount = 0;

	// The number of items ordered.
	int itemQty = 0;

	/** The line number of the item on the order.  
     * This is set once the order is actually saved to the database.
     */
	int lineNumber = 0;


	public OrderDetail(){
		super();
	}
	
	/**
	 * Create an OrderDetail object.   
	 * @param itemID	Integer  Item ID.  
	 * @param itemAmount  float Total cost of the line.  unit cost times the unit price.
	 * @param itemQty	int Number of units of the item.
	 */
	public OrderDetail ( Integer itemID, float itemAmount, int itemQty) {
 	 	this.itemID = itemID;   
        this.itemAmount = itemAmount;
        this.itemQty = itemQty;
	}
	
	/** @return String ID of the item ordered. */
	public Integer getItemID() { 
        return itemID; 
    }
	
	/** @return BigDecimal Total cost of the order line. */
	public float getItemAmount() { 
        return itemAmount;	
    }
	
	/** @return int Quanty of items ordered */
	public int getItemQty() { 
        return itemQty; 
    }
	
	/** @return int Order line's line number. */
	public int getLineNumber() { 
        return lineNumber; 
    }

	/** @param ln int Order line number. */
	public void setLineNumber(int ln) {
        lineNumber = ln;
    }
	
}
