VehicleModelDAO

interface VehicleModelDAO

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

Functions

Link copied to clipboard
abstract fun clear(vararg vehicleModels: DVehicleModel): Int

Removes all the data for selected vehicle models from the database

abstract fun clear(id: String): Int

Removes all the data for selected vehicle model from the database

Link copied to clipboard
abstract fun clearAll(): Int

Removes the data of all vehicle models

Link copied to clipboard
abstract fun getAllVehicleModels(): Flow<List<DVehicleModel>>

Queries for all vehicle models saved in the database

Link copied to clipboard

Queries for all vehicle models together with all the data connected to each instance that is located in different database tables. See VehicleModelFullInfo

Queries for all vehicle models of specified manufacturer. See VehicleModelFullInfo

Link copied to clipboard

Queries for all vehicle models together with all the data connected to each instance that is located in different database tables. See VehicleModelFullInfo

Link copied to clipboard

Queries for all vehicle models saved in the database

Link copied to clipboard

Queries for a vehicle model with given ID

Link copied to clipboard

Queries for a vehicle model with given ID together with all the data connected to it that is stored in different database tables.

Link copied to clipboard

Queries for a vehicle model with given ID together with all the data connected to it that is stored in different database tables.

Link copied to clipboard
abstract fun insert(vararg vehicleModels: DVehicleModel)

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

Link copied to clipboard
abstract fun insertOrUpdate(vararg vehicleModels: DVehicleModel)

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

Link copied to clipboard
abstract fun update(vararg vehicleModels: DVehicleModel): Int

Updates existing vehicle models (with same ID parameter).