|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--de.ix.jspTutorial.model.Order
This class represents a full pizza order including the base pizza, additional ingredients and the delivery address
| Field Summary | |
private Customer |
customer
delivery address |
private long |
id
unique id of the order |
private PersonalPizza |
pizza
ordered pizza including additional ingredients |
private double |
price
total cost of the order |
static java.lang.String |
vcid
version of the source |
| Fields inherited from interface de.ix.jspTutorial.constants.XMLConstants |
XML_ADDRESS1_TAG,
XML_ADDRESS2_TAG,
XML_CUSTOMER_TAG,
XML_DESCRIPTION_TAG,
XML_EMAIL_TAG,
XML_FIRSTNAME_TAG,
XML_INGREDIENT_LIST_TAG,
XML_INGREDIENT_TAG,
XML_LASTNAME_TAG,
XML_NAME_TAG,
XML_ORDER_TAG,
XML_PERSONAL_PIZZA_TAG,
XML_PRICE_TAG,
XML_ROOT_TAG,
XML_SIZE_TAG,
XML_TOWN_TAG,
XML_ZIP_TAG |
| Constructor Summary | |
Order()
Constructor for an empty order. |
|
Order(long id,
Customer customer,
PersonalPizza pizza,
double price)
Constructor for a real order |
|
| Method Summary | |
org.w3c.dom.Element |
generateXML(org.w3c.dom.Document document)
method to generate XML Element containing all important Order information |
Customer |
getCustomer()
Getter method for the attribute customer |
DatabaseGenericObject |
getGenericObject()
Method to create a generic object |
long |
getId()
Getter method for the attribute id |
java.util.List |
getIngredientGenericObjects()
Create a list of ingredients out of the current order for database storage. |
PersonalPizza |
getPersonalPizza()
Getter method for the attribute pizza |
DatabaseGenericObject |
getPizzaGenericObject()
Create the pizza out of the current order for database storage. |
double |
getPrice()
Getter method for the attribute price |
void |
setCustomer(Customer aCustomer)
Setter method for the attribute customer |
void |
setId(long aId)
Setter method for the attribute id |
void |
setPizza(PersonalPizza aPizza)
Setter method for the attribute pizza |
void |
setPrice(double aPrice)
Setter method for the attribute price |
java.lang.String |
toString()
Build a string out of the order attributes. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
public static java.lang.String vcid
private long id
private double price
private Customer customer
private PersonalPizza pizza
| Constructor Detail |
public Order()
null,
all numeric values to -1 or -1.0
public Order(long id,
Customer customer,
PersonalPizza pizza,
double price)
id - unique idcustomer - delivery addresspizza - pizza, including additional ingredientsprice - total cost| Method Detail |
public DatabaseGenericObject getGenericObject()
DatabaseGenericModifier.create(I_DatabaseGenericObject,String)public DatabaseGenericObject getPizzaGenericObject()
DatabaseGenericModifier.create(I_DatabaseGenericObject,String)public java.util.List getIngredientGenericObjects()
DatabaseGenericModifier.create(I_DatabaseGenericObject,String)public void setPizza(PersonalPizza aPizza)
pizzaaPizza - new value for the attribute pizzagetPersonalPizza()public PersonalPizza getPersonalPizza()
pizzasetPizza(PersonalPizza)public void setCustomer(Customer aCustomer)
customeraCustomer - new value for the attribute customergetCustomer()public Customer getCustomer()
customersetCustomer(Customer)public void setPrice(double aPrice)
priceaPrice - new value for the attribute pricegetPrice()public double getPrice()
pricesetPrice(double)public void setId(long aId)
idaId - new value for the attribute idgetId()public long getId()
idsetId(long)public org.w3c.dom.Element generateXML(org.w3c.dom.Document document)
Order informationdocument - XML Document, to create xml elementpublic java.lang.String toString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||