mirror of
https://github.com/NiciDieNase/chaosflix
synced 2024-11-23 12:53:08 +00:00
add missing WatchlistItemDao
This commit is contained in:
parent
7947c0495b
commit
f6dc00dcd0
1 changed files with 25 additions and 0 deletions
|
@ -0,0 +1,25 @@
|
|||
package de.nicidienase.chaosflix.common.entities
|
||||
|
||||
import android.arch.lifecycle.LiveData
|
||||
import android.arch.persistence.room.*
|
||||
import io.reactivex.Flowable
|
||||
import io.reactivex.Observable
|
||||
|
||||
/**
|
||||
* Created by felix on 04.10.17.
|
||||
*/
|
||||
|
||||
@Dao
|
||||
interface WatchlistItemDao {
|
||||
@Query("SELECT * from watchlist_item")
|
||||
fun getAll(): Flowable<List<WatchlistItem>>
|
||||
|
||||
@Query("SELECT * from watchlist_item WHERE id = :arg0 LIMIT 1")
|
||||
fun getItemForEvent(id:Int): Flowable<WatchlistItem>
|
||||
|
||||
@Insert(onConflict = OnConflictStrategy.REPLACE)
|
||||
fun saveItem(item: WatchlistItem)
|
||||
|
||||
@Delete
|
||||
fun deleteItem(item: WatchlistItem)
|
||||
}
|
Loading…
Reference in a new issue