Methods Summary |
---|
public void | addLineItem(CartItem cartItem)
LineItem lineItem = new LineItem(lineItems.size() + 1, cartItem);
addLineItem(lineItem);
|
public void | addLineItem(LineItem lineItem)
lineItems.add(lineItem);
|
public java.lang.String | getBillAddress1() return billAddress1;
|
public java.lang.String | getBillAddress2() return billAddress2;
|
public java.lang.String | getBillCity() return billCity;
|
public java.lang.String | getBillCountry() return billCountry;
|
public java.lang.String | getBillState() return billState;
|
public java.lang.String | getBillToFirstName() return billToFirstName;
|
public java.lang.String | getBillToLastName() return billToLastName;
|
public java.lang.String | getBillZip() return billZip;
|
public java.lang.String | getCardType() return cardType;
|
public java.lang.String | getCourier() return courier;
|
public java.lang.String | getCreditCard() return creditCard;
|
public java.lang.String | getExpiryDate() return expiryDate;
|
public java.util.List | getLineItems() return lineItems;
|
public java.lang.String | getLocale() return locale;
|
public java.util.Date | getOrderDate() return orderDate;
|
public int | getOrderId()
/* JavaBeans Properties */
return orderId;
|
public java.lang.String | getShipAddress1() return shipAddress1;
|
public java.lang.String | getShipAddress2() return shipAddress2;
|
public java.lang.String | getShipCity() return shipCity;
|
public java.lang.String | getShipCountry() return shipCountry;
|
public java.lang.String | getShipState() return shipState;
|
public java.lang.String | getShipToFirstName() return shipToFirstName;
|
public java.lang.String | getShipToLastName() return shipToLastName;
|
public java.lang.String | getShipZip() return shipZip;
|
public java.lang.String | getStatus() return status;
|
public double | getTotalPrice() return totalPrice;
|
public java.lang.String | getUsername() return username;
|
public void | initOrder(Account account, Cart cart)
username = account.getUsername();
orderDate = new Date();
shipToFirstName = account.getFirstName();
shipToLastName = account.getLastName();
shipAddress1 = account.getAddress1();
shipAddress2 = account.getAddress2();
shipCity = account.getCity();
shipState = account.getState();
shipZip = account.getZip();
shipCountry = account.getCountry();
billToFirstName = account.getFirstName();
billToLastName = account.getLastName();
billAddress1 = account.getAddress1();
billAddress2 = account.getAddress2();
billCity = account.getCity();
billState = account.getState();
billZip = account.getZip();
billCountry = account.getCountry();
totalPrice = cart.getSubTotal();
creditCard = "999 9999 9999 9999";
expiryDate = "12/03";
cardType = "Visa";
courier = "UPS";
locale = "CA";
status = "P";
Iterator i = cart.getAllCartItems();
while (i.hasNext()) {
CartItem cartItem = (CartItem) i.next();
addLineItem(cartItem);
}
|
public void | setBillAddress1(java.lang.String billAddress1) this.billAddress1 = billAddress1;
|
public void | setBillAddress2(java.lang.String billAddress2) this.billAddress2 = billAddress2;
|
public void | setBillCity(java.lang.String billCity) this.billCity = billCity;
|
public void | setBillCountry(java.lang.String billCountry) this.billCountry = billCountry;
|
public void | setBillState(java.lang.String billState) this.billState = billState;
|
public void | setBillToFirstName(java.lang.String billToFirstName) this.billToFirstName = billToFirstName;
|
public void | setBillToLastName(java.lang.String billToLastName) this.billToLastName = billToLastName;
|
public void | setBillZip(java.lang.String billZip) this.billZip = billZip;
|
public void | setCardType(java.lang.String cardType) this.cardType = cardType;
|
public void | setCourier(java.lang.String courier) this.courier = courier;
|
public void | setCreditCard(java.lang.String creditCard) this.creditCard = creditCard;
|
public void | setExpiryDate(java.lang.String expiryDate) this.expiryDate = expiryDate;
|
public void | setLineItems(java.util.List lineItems) this.lineItems = lineItems;
|
public void | setLocale(java.lang.String locale) this.locale = locale;
|
public void | setOrderDate(java.util.Date orderDate) this.orderDate = orderDate;
|
public void | setOrderId(int orderId) this.orderId = orderId;
|
public void | setShipAddress1(java.lang.String shipAddress1) this.shipAddress1 = shipAddress1;
|
public void | setShipAddress2(java.lang.String shipAddress2) this.shipAddress2 = shipAddress2;
|
public void | setShipCity(java.lang.String shipCity) this.shipCity = shipCity;
|
public void | setShipCountry(java.lang.String shipCountry) this.shipCountry = shipCountry;
|
public void | setShipState(java.lang.String shipState) this.shipState = shipState;
|
public void | setShipToFirstName(java.lang.String shipFoFirstName) this.shipToFirstName = shipFoFirstName;
|
public void | setShipToLastName(java.lang.String shipToLastName) this.shipToLastName = shipToLastName;
|
public void | setShipZip(java.lang.String shipZip) this.shipZip = shipZip;
|
public void | setStatus(java.lang.String status) this.status = status;
|
public void | setTotalPrice(double totalPrice) this.totalPrice = totalPrice;
|
public void | setUsername(java.lang.String username) this.username = username;
|