/* Ċ Ġ* ĠCreated Ġby ĠLee ĠOh ĠHy ung Ġon Ġ 2 0 2 0 / 0 9 / 2 6 . Ċ Ġ*/ Ċ package Ġkr . o hy ung . local . source Ċ Ċ import Ġio . reactivex . Comp letable Ċ import Ġio . reactivex . Single Ċ import Ġkr . o hy ung . data . model . Search History DataModel Ċ import Ġkr . o hy ung . data . source . local . Search History Local DataSource Ċ import Ġkr . o hy ung . local . compose Ċ import Ġkr . o hy ung . local . dao . Search History Dao Ċ import Ġkr . o hy ung . local . mapper . Search History Mapper Ċ import Ġjavax . inject . Inject Ċ Ċ class ĠSearch History Local DataSource Impl Ġ@ Inject Ġconstructor ( ĊĠĠĠ Ġprivate Ġval Ġsearch History Dao : ĠSearch History Dao , ĊĠĠĠ Ġprivate Ġval Ġsearch History Mapper : ĠSearch History Mapper Ċ ) Ġ: ĠSearch History Local DataSource Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġhas Item ( keyword : ĠString ): ĠSingle < Boolean > Ġ= ĊĠĠĠĠĠĠĠ Ġsearch History Dao . has Item ( keyword Ġ= Ġkeyword ). compose () ĊĊĠĠĠ Ġoverride Ġfun Ġinsert ( data Model : ĠSearch History DataModel ): ĠComp letable Ġ= ĊĠĠĠĠĠĠĠ Ġsearch History Dao . insert ( search History Mapper . to Room Object ( data Model )). compose () ĊĊĠĠĠ Ġoverride Ġfun Ġinsert ( data Models : ĠList < Search History DataModel >): ĠComp letable Ġ= ĊĠĠĠĠĠĠĠ Ġsearch History Dao . insert ( search History Mapper . to Room Objects ( data Models )). compose () ĊĊĠĠĠ Ġoverride Ġfun Ġupdate ( data Model : ĠSearch History DataModel ): ĠComp letable Ġ= ĊĠĠĠĠĠĠĠ Ġsearch History Dao . update ( search History Mapper . to Room Object ( data Model )). compose () ĊĊĠĠĠ Ġoverride Ġfun Ġdelete ( data Model : ĠSearch History DataModel ): ĠComp letable Ġ= ĊĠĠĠĠĠĠĠ Ġsearch History Dao . delete ( search History Mapper . to Room Object ( data Model )). compose () ĊĊĠĠĠ Ġoverride Ġfun Ġdelete ( keyword : ĠString ): ĠComp letable Ġ= ĊĠĠĠĠĠĠĠ Ġsearch History Dao . delete ( keyword Ġ= Ġkeyword ). compose () ĊĊĠĠĠ Ġoverride Ġfun ĠgetAll (): ĠSingle < List < Search History DataModel >> Ġ= ĊĠĠĠĠĠĠĠ Ġsearch History Dao . getAll () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. map Ġ{ Ġsearch History Mapper . to Data Models ( it ) Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. compose () ĊĊĠĠĠ Ġoverride Ġfun Ġget Count (): ĠSingle < Int > Ġ= ĊĠĠĠĠĠĠĠ Ġsearch History Dao . getCount (). compose () ĊĊĠĠĠ Ġoverride Ġfun Ġdrop (): ĠComp letable Ġ= ĊĠĠĠĠĠĠĠ Ġsearch History Dao . drop (). compose () Ċ } Ċ