Skip to content

Code Database Logging Foods

Yannik Schmidt edited this page Apr 20, 2021 · 1 revision

To log foods you must use the Database functions:

logExistingFoods(ArrayList<SelectedFoodItem>, LocalDateTime)
logExistingFoods(ArrayList<Food>, LocalDateTime)

To update an existing food group use:

updateFoodGroup(ArrayList<SelectedFoodItem> updatedListWithAmounts, int groupId)

Foods are identified by it's logged time and it's id, to delete it use:

deleteLoggedFood(ArrayList<Food> foods, LocalDateTime d)
deleteLoggedFood(Food f, LocalDateTime d)
Clone this wiki locally