CachingCantEatRepository
class CachingCantEatRepository(cantEatDao: CantEatDao, cantEatApiService: CantEatApiService) : CantEatRepository
Implementation of the CantEatRepository interface. It uses a local database and a remote API for managing CantEat data.
Functions
Link copied to clipboard
Deletes a CantEat item from the remote API and the local database.
Link copied to clipboard
Fetches all CantEat items from the local database. If the local database is empty, it refreshes the data from the remote API.
Link copied to clipboard
Inserts a CantEat item into the local database.
Link copied to clipboard
Saves a CantEat item to the remote API and the local database. If the item already exists in the remote API, it updates the item. Otherwise, it creates a new item.
Link copied to clipboard
Updates a CantEat item in the remote API and the local database.