ProfileDAO

interface ProfileDAO

Database access object responsible for interaction with vehicles profiles table of the vehicle manager database. Actual DAO instance is generated by Room library.

Functions

Link copied to clipboard
abstract fun clear()

Removes the data of all vehicle profiles

abstract fun clear(vararg profiles: DProfile)

Removes all the data for selected vehicle profiles from the database

abstract fun clear(vehicleModelId: String)

Removes the data of all vehicle profiles that corresponds to passed vehicleModelId

Link copied to clipboard

Queries for all vehicle profiles saved in the database

Link copied to clipboard
abstract fun getProfile(id: String): LiveData<DProfile>

Queries for a vehicle profile with given ID

Link copied to clipboard
abstract fun insert(vararg profiles: DProfile)

Inserts new profiles to the database. If profile with given ID already exists, the item will not be updated. See insertOrUpdate.

Link copied to clipboard
abstract fun insertOrUpdate(vararg profiles: DProfile)

Inserts or updates vehicle profiles in the database. In case the profile with given ID is already present in the database, it's data will be updated.

Link copied to clipboard
abstract fun update(vararg profiles: DProfile)

Updates existing vehicle profiles (with same ID parameter).