FileDocCategorySizeDatePackage
Order.javaAPI DocHibernate 3.2.52999Thu Nov 25 07:37:00 GMT 2004org.hibernate.test.cid

Order

public class Order extends Object
author
Gavin King

Fields Summary
private Id
id
private Calendar
orderDate
private Customer
customer
private Collection
lineItems
private BigDecimal
total
Constructors Summary
public Order(Customer customer)


	   
		this.customer = customer;
		this.id.customerId = customer.getCustomerId();
		this.id.orderNumber = customer.getOrders().size();
		customer.getOrders().add(this);
	
public Order()

Methods Summary
public LineItemgenerateLineItem(Product product, int quantity)

		LineItem li = new LineItem( this, product );
		li.setQuantity( quantity );
		lineItems.add( li );
		return li;
	
public CustomergetCustomer()

return
Returns the customer.

		return customer;
	
public org.hibernate.test.cid.Order$IdgetId()

return
Returns the id.

		return id;
	
public java.util.CollectiongetLineItems()

return
Returns the lineItems.

		return lineItems;
	
public java.util.CalendargetOrderDate()

return
Returns the orderDate.

		return orderDate;
	
public java.math.BigDecimalgetTotal()

return
Returns the total.

		return total;
	
public voidsetCustomer(Customer customer)

param
customer The customer to set.

		this.customer = customer;
	
public voidsetId(org.hibernate.test.cid.Order$Id id)

param
id The id to set.

		this.id = id;
	
public voidsetLineItems(java.util.Collection lineItems)

param
lineItems The lineItems to set.

		this.lineItems = lineItems;
	
public voidsetOrderDate(java.util.Calendar orderDate)

param
orderDate The orderDate to set.

		this.orderDate = orderDate;
	
public voidsetTotal(java.math.BigDecimal total)

param
total The total to set.

		this.total = total;