package Ġcom . sure t . movies app . data . repository . datasource impl Ċ Ċ import Ġandroidx . lifecycle . LiveData Ċ import Ġcom . sure t . movies app . data . db . Movie Dao Ċ import Ġcom . sure t . movies app . data . model . Favorite Movie Model Ċ import Ġcom . sure t . movies app . data . model . Trend ing Movies Model Ċ import Ġcom . sure t . movies app . data . repository . datasource . Local DataSource Ċ Ċ class ĠLocal DataSource Impl Ġ( private Ġval Ġmovie Dao : ĠMovie Dao ) Ġ: ĠLocal DataSource Ġ{ ĊĊĠĠĠ Ġoverride Ġfun ĠgetAll Movies (): ĠLive Data < List < Trend ing Movies Model >> Ġ= ĊĠĠĠĠĠĠĠ Ġmovie Dao . getAll Movies () ĊĊĊĠĠĠ Ġoverride Ġfun Ġget Favorite Movies (): ĠLive Data < List < Favorite Movie Model >> Ġ= ĊĠĠĠĠĠĠĠ Ġmovie Dao . get Favorite Movies () ĊĊĠĠĠ Ġoverride Ġsuspend Ġfun Ġdelete Movie Table () Ġ{ ĊĠĠĠĠĠĠĠ Ġmovie Dao . delete Movie Table () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġsuspend Ġfun Ġinsert Movie List ( movie Model : ĠList < Trend ing Movies Model >) Ġ{ ĊĠĠĠĠĠĠĠ Ġmovie Dao . insert Movie List ( movie Model ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġsuspend Ġfun Ġupdate Favorite Status ( movie Model : ĠT rend ing Movies Model ) Ġ{ ĊĠĠĠĠĠĠĠ Ġmovie Dao . update Favorite Status ( movie Model ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġsuspend Ġfun Ġinsert Favorite Movie ( favorite Movie Model : ĠF avorite Movie Model ) Ġ{ ĊĠĠĠĠĠĠĠ Ġmovie Dao . insert Favorite Movie ( favorite Movie Model ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġsuspend Ġfun Ġremove Favorite Movie ( favorite Movie Model : ĠF avorite Movie Model ) Ġ{ ĊĠĠĠĠĠĠĠ Ġmovie Dao . remove Favorite Movie ( favorite Movie Model ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġsuspend Ġfun Ġget Favorite Movie ById ( id : ĠInt ): ĠF avorite Movie Model Ġ= ĊĠĠĠĠĠĠĠ Ġmovie Dao . get Favorite Movie ById ( id ) ĊĊ Ċ }