package Ġh os se in z afari . github . code question . data . datasource . local . db Ċ Ċ import Ġandroidx . lifecycle . LiveData Ċ import Ġh os se in z afari . github . code question . data . Room . entity . Bookmark Course Entity Ċ import Ġh os se in z afari . github . code question . data . main . Bookmark Course Main Ċ import Ġh os se in z afari . github . framework . core . app . G Ċ Ċ /* ĊĠĠĠ Ġ@ created Ġin Ġ 2 8 / 1 1 / 2 0 2 0 Ġ- Ġ 1 0 : 2 7 ĠAM ĊĠĠĠ Ġ@ project ĠCode ĠQuestion ĊĠĠĠ Ġ@ author ĠH os se in ĠZ afari ĊĠĠĠ Ġ@ email Ġ Ġh os se in z afari 2 0 0 0 @ gmail . com Ċ */ Ċ Ċ class ĠBook mark Course DataSource Ġ: ĠBook mark Course Main Ġ{ ĊĠĠĠ Ġprivate Ġval Ġbookmark Course Dao Ġby Ġlazy Ġ{ Ġ ĠG . database . get Bookmark Course Dao () Ġ Ġ} ĊĊĊĠĠĠ Ġoverride Ġsuspend Ġfun Ġadd Bookmark Course ( entity : ĠBook mark Course Entity ) Ġ= Ġbookmark Course Dao . add Bookmark Course ( entity ) ĊĊĠĠĠ Ġoverride Ġsuspend Ġfun Ġdelete Bookmark Course ( entity : ĠBook mark Course Entity ) Ġ= Ġbookmark Course Dao . delete Bookmark Course ( entity ) ĊĊĠĠĠ Ġoverride Ġfun ĠgetAll Book marked Course (): ĠLive Data < List < Bookmark Course Entity > ?> Ġ= Ġbookmark Course Dao . getAll Book marked Course () ĊĊĠĠĠ Ġoverride Ġfun Ġget Bookmark Course ById ( id : ĠInt ): ĠLive Data < Bookmark Course Entity ?> Ġ= Ġbookmark Course Dao . get Bookmark Course ById ( id ) Ċ Ċ }