CargoDao

interface CargoDao

The Data Access Object for the CargoRoomEntity class.

Functions

Link copied to clipboard
abstract suspend fun delete(cargo: CargoRoomEntity)

Deletes a cargo from the local database.

Link copied to clipboard
abstract fun getCargoByCargoNumber(cargoNumber: String): CargoRoomEntity

Retrieves a cargo from the local database by cargo number.

Link copied to clipboard
abstract suspend fun getCargosByRouteNumber(routeNumber: String): List<CargoRoomEntity>

Retrieves all cargos from the local database for a specified route number.

Link copied to clipboard
abstract suspend fun insert(cargo: CargoRoomEntity)

Inserts a single cargo into the local database. If a conflict occurs, the existing cargo is replaced.

Link copied to clipboard
abstract suspend fun insertAll(cargos: List<CargoRoomEntity>)

Inserts a list of cargos into the local database. If a conflict occurs, the existing cargos are replaced.

Link copied to clipboard
abstract suspend fun update(cargo: CargoRoomEntity)

Updates a cargo in the local database.