/******************************************************************************
 * 
 * Pratical Course "Verteilter Terminkalender, 1999"
 * Programming Assignment 3
 *
 ******************************************************************************
 * 
 * package cafeteria
 * CafeteriaEvent.java
 *
 *****************************************************************************/

package cafeteria;

import java.io.Serializable;
import java.util.Date;

/******************************************************************************
 *
 * this class represents an cafeteria entry. An entry is part of the total 
 * cafeteria plan of one day. The entry serves as event, request and reply of
 * cafeteria information. <p>
 * In case of an request, only the <em>kind</em> field is necessary to be set. 
 * In case of an event or an reply the <em>kind</em> and <em>date</em> field
 * are obligatory. Other fields are optional depending on the kind of event or 
 * request.<p>
 * Example:
 * <pre>
 *     kind          = MAIN
 *     date          = 17.05.1999
 *     meal          = "Rahmschnitzel"
 *     soup          = "Kartoffelsuppe"
 *     supplementals = { "Spätzle", "Salat" }
 *     beverages     = null
 * </pre>
 *
 * It has to be serializable to be transmitted via a software bus (like iBus).
 *
 * @author Torsten Illmann
 * @version 1.0 99-05-18 15:30 Initial coding.<br>
 *          1.1 99-05-18 17:53 type of kind changed to int, 
 *                             types of constants were missing (int)<br>
 *          1.2 99-05-18 18:12 extends Serializable changed to implements<br>
 * 
 *****************************************************************************/

public class CafeteriaEntry implements Serializable {

	//=members====================================================================
	
	// --- constants ---
	
	/** means or request for main meal. */
	public static final int MAIN = 0; 

	/** means or request for alternative meal 1. */
	public static final int CHOICE1 = 1; // 

	/** means or request for alternative meal 2. */
	public static final int CHOICE2 = 2; 

	/** means or request for cheap meal. */
	public static final int CHEAP = 3; 

	/** means or request for supplementals like. noodles, fries, salad, veg. */
	public static final int SUPPLEMENTALS = 4; 

	/** means or request for beverages like coke, sprite, juice. */
	public static final int BEVERAGES = 5; 

	/** means or request for soup. */
	public static final int SOUP = 6; 

	/** means or request for all non-meal stuff. */
	public static final int ADDONS = 7; 

	/** means or request for total cafeteria menu of actual time. */
	public static final int ALL = 8; 
	 
	// --- data memebers ----
	
	/** kind identifier cafeteria entry (see constants). */
	public int kind;                 
	
	/** actual date, only filled by senders. */
	public Date date;                      

	/** optional name of meal. */
	public String meal;
	
	/** optional name of soup. */                 
	public String soup;                 
	
	/** optional name(s) of supplementals. */
	public String[] supplementals;        
	
	/** optional name(s) of beverages. */
	public String[] beverages;            
		
}