ca.spaz.cron.database
Class Serving
java.lang.Object
ca.spaz.cron.database.Serving
public class Serving
- extends java.lang.Object
Stores an amount and time of a food serving
- Author:
- davidson
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Serving
public Serving()
Serving
public Serving(Food f)
Serving
public Serving(Food f,
double grams)
getGrams
public double getGrams()
getAmount
public double getAmount()
setAmount
public void setAmount(double val)
getFood
public Food getFood()
getDate
public java.util.Date getDate()
setDate
public void setDate(java.util.Date d)
exists
public boolean exists()
- Returns:
- true if the object is already in the database
updateDatabase
public void updateDatabase()
- Update the existing food information
deleteFromDatabase
public void deleteFromDatabase()
setGrams
public void setGrams(double amount)
getMeal
public int getMeal()
- Returns:
- the ID of the meal this serving was eaten at.
getID
public int getID()
- Returns:
- Returns the iD.
setID
public void setID(int id)
- Parameters:
id
- The ID to set.
getMeasure
public Measure getMeasure()
- Returns:
- Returns the measure.
setMeasure
public void setMeasure(Measure measure)
- Parameters:
measure
- The measure to set.
setMeal
public void setMeal(int meal)
- Parameters:
meal
- The meal to set.
setFood
public void setFood(Food food)
- Parameters:
food
-
setMeasure
public void setMeasure(int MID)
Copyright © 2005 Spaz. All Rights Reserved.