package Ġcom . th ios in . crypto info . data . disk Ċ Ċ import Ġcom . th ios in . crypto info . data . disk . dao . Coin Dao Ċ import Ġcom . th ios in . crypto info . data . disk . models . Room Coin Ċ import Ġcom . th ios in . crypto info . domain . models . Domain Coin Ċ import Ġjavax . inject . Inject Ċ Ċ class ĠDisk DataSource Ġ@ Inject Ġconstructor ( ĊĠĠĠ Ġprivate Ġval Ġcoin Dao : ĠCoin Dao Ċ ) Ġ{ ĊĊĠĠĠ Ġfun ĠgetAll Coins (): ĠList < Domain Coin > Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġcoin Dao . getAll Coins (). map ( Room Coin :: to Domain Coin ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun ĠgetAll Coin sBy Symbol ( symbol : ĠString ): ĠList < Domain Coin > Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġcoin Dao . getAll Coin sBy Symbol ("% $ symbol % "). map ( Room Coin :: to Domain Coin ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġupdate Coins ( coins : ĠList < Domain Coin >) Ġ{ ĊĠĠĠĠĠĠĠ Ġcoin Dao . refresh Coins ( coins . map ( Domain Coin :: to Room Coin )) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġupdate Coin ( coin : ĠDomain Coin ) Ġ{ ĊĠĠĠĠĠĠĠ Ġcoin Dao . update Coin ( coin . to Room Coin ()) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġget Coin By Symbol ( symbol : ĠString ): ĠDomain Coin Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġcoin Dao . getC oin By Symbol ( symbol ). to Domain Coin () ĊĠĠĠ Ġ} Ċ Ċ }