public class FoodNutrientDBH
extends com.readystatesoftware.sqliteasset.SQLiteAssetHelper
Constructor and Description |
---|
FoodNutrientDBH(android.content.Context context)
The constructor simply copies the database named foodnutrients.db from the assets folder
|
Modifier and Type | Method and Description |
---|---|
java.util.List<FoodNutrients> |
getFoodNutrients()
Returns a list of all the data in the database stored as FoodNutrients objects.
|
FoodNutrients |
getFoodNutrientsByName(java.lang.String name)
Get a FoodNutrients object containing all nutritional info of a food.
|
close, getReadableDatabase, getWritableDatabase, onConfigure, onCreate, onDowngrade, onUpgrade, setForcedUpgrade, setForcedUpgrade, setForcedUpgradeVersion
public FoodNutrientDBH(android.content.Context context)
context
- public java.util.List<FoodNutrients> getFoodNutrients()
public FoodNutrients getFoodNutrientsByName(java.lang.String name)
name
- name of the food of which we can to get nutrition values