de.ix.jspTutorial.model
Class IngredientList

java.lang.Object
  |
  +--de.ix.jspTutorial.model.IngredientList

public class IngredientList
extends java.lang.Object

This class represents the list of pizza 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
static java.lang.String vcid
          version of the source
 
Constructor Summary
IngredientList()
          Constructor for an empty list of ingredients
IngredientList(java.util.TreeMap ingredients)
          Constructor for a list of ingredients.
 
Method Summary
 Ingredient getIngredient(java.lang.Long key)
          Getter method for one ingredient
 java.util.TreeMap getIngredients()
          Getter method for the attribute ingredients
 void readList(javax.servlet.ServletContext aApplication)
          Read all posible ingredients out of the session or db with the help of the PizzaAccessor object.
 java.lang.String toString()
          Build a string out of the ingredient list.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

vcid

public static java.lang.String vcid
version of the source

ingredients

private java.util.TreeMap ingredients
List of ingredients
Constructor Detail

IngredientList

public IngredientList()
Constructor for an empty list of ingredients
See Also:
readList(ServletContext)

IngredientList

public IngredientList(java.util.TreeMap ingredients)
Constructor for a list of ingredients.
Parameters:
ingredients - list of initial ingredients
See Also:
readList(ServletContext)
Method Detail

getIngredient

public Ingredient getIngredient(java.lang.Long key)
Getter method for one ingredient
Parameters:
key - unique identifier of the requested ingredient
Returns:
requested ingredient

getIngredients

public java.util.TreeMap getIngredients()
Getter method for the attribute ingredients
Returns:
TreeMap representing the ingredient list

readList

public void readList(javax.servlet.ServletContext aApplication)
Read all posible ingredients out of the session or db with the help of the PizzaAccessor object.
Parameters:
aApplication - the application

toString

public java.lang.String toString()
Build a string out of the ingredient list.
Overrides:
toString in class java.lang.Object
Returns:
String representation of the ingredient list


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