Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.ix.jspTutorial.model
Class PersonalPizza

    java.lang.Object
      |
      +--de.ix.jspTutorial.model.Pizza
            |
            +--de.ix.jspTutorial.model.PersonalPizza

public class PersonalPizza
extends Pizza
implements XMLConstants, XMLModelInterface

This class represents a personalized pizza including the base pizza and some additional ingredients.

Version:
  $Id:$
Author:
  Peter Rossbach (pr@webapp.de), Lars Röwekamp ( lars.roewekamp@openKnowledge.de)

Field Summary
`private java.util.TreeMap` | `ingredients` List of ingredients

Fields inherited from class de.ix.jspTutorial.model.Pizza
`basePrice, id, name, size, 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
`PersonalPizza()` Default Constructor
`PersonalPizza(javax.servlet.http.HttpServletRequest aRequest, java.lang.String pizzaId, java.lang.String ingredientIds)` Constructor for a real personal pizza

Method Summary
`double` | `calcTotalPrice()` Calc price of current personal pizza.
`org.w3c.dom.Element` | `generateXML(org.w3c.dom.Document document)` method to generate XML Element containing all important `PersonalPizza` information
`java.util.TreeMap` | `getIngredients()` Getter method for the attribute `ingredients`
`Pizza` | `getPizza()` Getter method for the attribute `pizza`
`void` | `setIngredients(java.util.TreeMap newIngredients)` Setter method for the attribute `ingredients`
`void` | `setPizza(Pizza newPizza)` Setter method for the attribute `pizza`

Methods inherited from class de.ix.jspTutorial.model.Pizza
`getBasePrice, getGenericObject, getId, getName, getSize, setBasePrice, setId, setName, setSize, toString`

Methods inherited from class java.lang.Object
`, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait`

Field Detail

### ingredients

    private java.util.TreeMap ingredients

  List of ingredients

Constructor Detail

### PersonalPizza

    public PersonalPizza()

  Default Constructor

### PersonalPizza

    public PersonalPizza(javax.servlet.http.HttpServletRequest aRequest,
                         java.lang.String pizzaId,
                         java.lang.String ingredientIds)

  Constructor for a real personal pizza
  Parameters:
    `aRequest` - current httpRequest
    `pizzaId` - unique id of the requested pizza
    `ingredientIds` - list of unique ids of requested ingredients

Method Detail

### getIngredients

    public java.util.TreeMap getIngredients()

  Getter method for the attribute `ingredients`
  Returns:
    current value of the attribute ingredients
  See Also:
    `setIngredients(java.util.TreeMap)`

### setIngredients

    public void setIngredients(java.util.TreeMap newIngredients)

  Setter method for the attribute `ingredients`
  Parameters:
    `newIngredients` - new value for the attribute ingredients
  See Also:
    `getIngredients()`

### getPizza

    public Pizza getPizza()

  Getter method for the attribute `pizza`
  Returns:
    current value of the attribute pizza
  See Also:
    `setPizza(Pizza)`

### setPizza

    public void setPizza(Pizza newPizza)

  Setter method for the attribute `pizza`
  Parameters:
    `newPizza` - new value for the attribute pizza
  See Also:
    `getPizza()`

### calcTotalPrice

    public double calcTotalPrice()

  Calc price of current personal pizza.
  Returns:
    the total cost of the pizza

### generateXML

    public org.w3c.dom.Element generateXML(org.w3c.dom.Document document)

  method to generate XML Element containing all important `PersonalPizza` information
  Specified by:
    generateXML in interface XMLModelInterface
  Parameters:
    `document` - XML Document, to create xml element
  Returns:
    xml element containing XML representation of PersonalPizza

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

~ Das iX JSP Tutorial III - © 2000 by Peter Roßbach ~