VehicleRepository

Entry point for interacting with vehicle manager module.

Inheritors

Properties

Link copied to clipboard

Live data instance keeping track of information about all the available manufacturers

Link copied to clipboard

Live data instance keeping track of all vehicle models available in the repository

Functions

Link copied to clipboard
abstract suspend fun clearManufacturers()

Clears vehicle manufacturers from local database

Link copied to clipboard
abstract suspend fun clearVehicleModel(vehicleModelId: String): Int

Clears vehicle model that corresponds to vehicleModelId from local database

Link copied to clipboard
abstract suspend fun clearVehicleModels(manufacturer: Manufacturer): Int

Clears vehicle models of specified manufacturer from local database

Link copied to clipboard
abstract suspend fun fetchFullVehicleModel(vehicleModelId: String): Error?

Gets vehicle model data of specified id from BeMap if its not already in local database.

Link copied to clipboard
abstract suspend fun fetchManufacturers(): Error?

Gets manufacturers data from BeMap API if data is not already in local database

Link copied to clipboard
abstract suspend fun fetchVehicleModels(manufacturer: Manufacturer): Error?

Gets vehicle models data of specified manufacturer from BeMap and saves it in local database.

Link copied to clipboard
abstract suspend fun getAllManufacturers(): List<Manufacturer>

Gets all manufacturers from local database

Link copied to clipboard
abstract suspend fun getVehicleModels(manufacturer: Manufacturer): List<VehicleModel>

Gets all vehicle models of specified manufacturer.

Link copied to clipboard
abstract suspend fun getVehicleModelWithId(id: String): VehicleModel?

Gets a vehicle model by specifying its id.

Link copied to clipboard

Queries for information (and updates) regarding specific vehicle model