package Ġcom . dav oh . mov ied b _ mv vm _ android . framework . room . movies . popular Movies Ċ Ċ import Ġandroidx . lifecycle . LiveData Ċ import Ġandroidx . room . Dao Ċ import Ġandroidx . room . Insert Ċ import Ġandroidx . room . On Conflict Strategy Ċ import Ġandroidx . room . Query Ċ import Ġcom . dav oh . mov ied b _ mv vm _ android . framework . room . movies . popular Movies . entities . Movie Pop ular Entity Ċ import Ġio . reactivex . rx java 3 . core . Single Ċ Ċ @ Dao Ċ interface ĠMovie Pop ular Dao Ġ{ ĊĠĠĠĠĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġmovie _ popular _ table ") ĊĠĠĠ Ġfun Ġget Movies (): ĠLive Data < List < Movie Pop ular Entity >> ĊĠĠĠĠĊĠĠĠ Ġ@ Insert ( on Conflict Ġ= ĠOn Conflict Strategy . REPLACE ) ĊĠĠĠ Ġfun Ġadd Movies ( entity : ĠList < Movie Pop ular Entity >): ĠSingle < List < Long >> ĊĠĠĠĠĊĠĠĠ Ġ@ Query (" DELETE ĠFROM Ġmovie _ popular _ table ") ĊĠĠĠ Ġfun Ġdelete Movies (): ĠSingle < Int > ĊĠĠĠĠ Ċ }