Taxonomies Repository
This is a repository class which implements repository interface.
Author
Lobster
Since
03.03.18
Constructors
Types
Functions
Delete rows from Ingredient, IngredientName and IngredientsRelation set the autoincrement to 0
Loads translated additive from the local database by unique tag of additive and language code
Loads translated allergen from the local database by unique tag of allergen and language code
Loads all translated allergens.
Loads translated and selected/unselected allergens.
Loads list of translated category names from the local database by language code
Loads translated category from the local database by unique tag of category and language code
Load allergens which user selected earlier (i.e user's allergens)
Loads translated states from the local database by unique tag of states and language code
Load additives from the server or local database
Load allergens from the server or local database
Load analysis tags from the server or local database
Load categories from the server or local database
Load countries from the server or local database
TODO to be improved by loading only in the user language ? Load ingredients from (the server or) local database If SharedPreferences lastDownloadIngredients is set try this : if file from the server is newer than last download delete database, load the file and fill database, else if database is empty, download the file and fill database, else return the content from the local database.
Load labels from the server or local database
Load states from the server or local database
Load stores from the server or local database
Load tags from the server or local database
Save a list of allergens to the local DB.
Changes enabled field of allergen and updates it.