package Ġcom . example . android . code labs . paging . db . dao Ċ Ċ import Ġandroidx . room . Dao Ċ import Ġandroidx . room . Insert Ċ import Ġandroidx . room . On Conflict Strategy Ċ import Ġandroidx . room . Query Ċ import Ġcom . example . android . code labs . paging . db . Remote Keys Ċ Ċ @ Dao Ċ interface ĠRemote Keys Dao Ġ{ ĊĊĠĠĠ Ġ// ĠInsert Ġa Ġlist Ġof ĠRemote Keys , Ġas Ġwhenever Ġwe Ġget ĠRe pos Ġfrom Ġthe Ġnetwork Ġwe Ġwill Ġgenerate Ġthe Ġremote Ġkeys Ġfor Ġthem . ĊĠĠĠ Ġ@ Insert ( on Conflict Ġ= ĠOn Conflict Strategy . REPLACE ) ĊĠĠĠ Ġsuspend Ġfun Ġinsert All ( remote Key : ĠList < Remote Keys >) ĊĊĠĠĠ Ġ// ĠGet Ġa ĠRemote Key Ġbased Ġon Ġa ĠRepo Ġid . ĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġremote _ keys ĠWHERE Ġrepo Id Ġ= Ġ: repo Id ") ĊĠĠĠ Ġsuspend Ġfun Ġremote Keys Repo Id ( repo Id : ĠLong ): ĠRemote Keys ? ĊĊĠĠĠ Ġ// ĠClear Ġthe ĠRemote Keys , Ġwhich Ġwe Ġwill Ġuse Ġwhenever Ġwe Ġhave Ġa Ġnew Ġquery . ĊĠĠĠ Ġ@ Query (" DELETE ĠFROM Ġremote _ keys ") ĊĠĠĠ Ġsuspend Ġfun Ġclear Remote Keys () Ċ }