|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--de.ix.jspTutorial.model.Ingredient
Class to represent an ingredient of a pizza.
| Field Summary | |
private long |
id
unique id of the ingredient |
private java.lang.String |
name
Name of the ingredient |
private double |
price
Price of the ingredient |
static java.lang.String |
vcid
version of the source |
| Fields inherited from interface de.ix.jspTutorial.database.I_DatabaseObject |
vcid |
| 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 | |
Ingredient()
Constructor for an empty ingredient object |
|
Ingredient(long id,
java.lang.String name,
double price)
Constructor sets all necessary values |
|
| Method Summary | |
org.w3c.dom.Element |
generateXML(org.w3c.dom.Document document)
method to generate XML Element containing all important Ingredient information |
DatabaseGenericObject |
getGenericObject()
Method to create a generic object |
long |
getId()
Getter method for the attribute id |
java.lang.String |
getName()
Getter method for the attribute name |
double |
getPrice()
Getter method for the attribute price |
void |
setId(long newId)
Setter method for the attribute id |
void |
setName(java.lang.String newName)
Setter method for the attribute name |
void |
setPrice(double newPrice)
Setter method for the attribute price |
java.lang.String |
toString()
Build a string out of the ingredient attributes. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
public static java.lang.String vcid
private long id
private java.lang.String name
private double price
| Constructor Detail |
public Ingredient()
public Ingredient(long id,
java.lang.String name,
double price)
id - unique id of the ingredientname - name f the ingredientprice - price of the ingredient| Method Detail |
public DatabaseGenericObject getGenericObject()
DatabaseGenericModifier.create(I_DatabaseGenericObject,String)public long getId()
idsetId(long)public void setId(long newId)
idnewId - new value for the attribute idgetId()public java.lang.String getName()
namesetName(String)public void setName(java.lang.String newName)
namenewName - new value for the attribute namegetName()public void setPrice(double newPrice)
pricenewPrice - new value for the attribute pricegetPrice()public double getPrice()
pricesetPrice(double)public org.w3c.dom.Element generateXML(org.w3c.dom.Document document)
Ingredient 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 | ||||||||