Methods Summary |
---|
public void | add(Item item, int quantity)
_orderItems.add( new OrderItem( item, quantity ) );
|
public Address | getAddress()
return _address;
|
public CreditCard | getCreditCard()
return _creditCard;
|
public Customer | getCustomer()
return _customer;
|
public java.util.Date | getOrderDate()
return _orderDate;
|
public long | getOrderId()
return _orderId;
|
public java.util.Set | getOrderItems()
return _orderItems;
|
public java.lang.String | getStatus()
return _status;
|
public double | getTotal()
double total = 0;
Iterator it = _orderItems.iterator( );
while ( it.hasNext( ) )
{
total += ( ( OrderItem ) it.next( ) ).getSubTotal( );
}
return total;
|
public void | setAddress(Address address)Sets the address.
_address = address;
|
public void | setCreditCard(CreditCard creditCard)Sets the creditCard.
_creditCard = creditCard;
|
public void | setCustomer(Customer customer)Sets the customer.
_customer = customer;
|
public void | setOrderDate(java.util.Date orderDate)Sets the orderDate.
_orderDate = orderDate;
|
public void | setOrderId(long orderId)Sets the orderId.
_orderId = orderId;
|
public void | setOrderItems(java.util.Set orderItems)Sets the orderItems.
_orderItems = orderItems;
|
public void | setStatus(java.lang.String status)Sets the status.
_status = status;
|