package Ġdog . snow . android re cruit test . data . repository Ċ Ċ import Ġdog . snow . android re cruit test . data . model . raw . Raw Album Ċ import Ġdog . snow . android re cruit test . data . model . raw . Raw Photo Ċ import Ġdog . snow . android re cruit test . data . model . raw . Raw User Ċ import Ġdog . snow . android re cruit test . data . model . type . common . U Id Ċ import Ġdog . snow . android re cruit test . data . source . local . Database Manager Ċ import Ġio . reactivex . Flow able Ċ import Ġio . reactivex . schedul ers . Schedulers Ċ import Ġjavax . inject . Inject Ċ Ċ class ĠStorage Repository Impl Ġ@ Inject Ġconstructor ( ĊĠĠĠ Ġprivate Ġval Ġdatabase Manager : ĠDatabase Manager Ċ ) Ġ: ĠStorage Repository Ġ{ ĊĊĠĠĠ Ġ/** ĠLists . Ġ*/ ĊĊĊĠĠĠ Ġoverride Ġfun Ġget Photos (): ĠFlow able < Raw Photo > Ġ= Ġdatabase Manager . get Photos () ĊĠĠĠĠĠĠĠ Ġ. subscribe On ( Schedulers . new Thread ()) ĊĊĠĠĠ Ġoverride Ġfun Ġget Album s (): ĠFlow able < Raw Album > Ġ= Ġget Photos () ĊĠĠĠĠĠĠĠ Ġ. subscribe On ( Schedulers . new Thread ()) ĊĠĠĠĠĠĠĠ Ġ. concat Map Ġ{ Ġdatabase Manager . get Album ( it . album U Id ) Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġget Users (): ĠFlow able < Raw User > Ġ= Ġget Album s () ĊĠĠĠĠĠĠĠ Ġ. subscribe On ( Schedulers . new Thread ()) ĊĠĠĠĠĠĠĠ Ġ. concat Map Ġ{ Ġdatabase Manager . getUser ( it . user U Id ) Ġ} ĊĊĠĠĠ Ġ/** ĠSingle Ġvalues . Ġ*/ ĊĊĠĠĠ Ġoverride Ġfun Ġget Photo ( photo U Id : ĠU Id ): ĠFlow able < Raw Photo > Ġ= Ġdatabase Manager . get Photo ( photo U Id ) ĊĠĠĠĠĠĠĠ Ġ. subscribe On ( Schedulers . new Thread ()) ĊĊĠĠĠ Ġoverride Ġfun Ġget Album By Photo Id ( photo U Id : ĠU Id ): ĠFlow able < Raw Album > Ġ= Ġget Photo ( photo U Id ) ĊĠĠĠĠĠĠĠ Ġ. subscribe On ( Schedulers . new Thread ()) ĊĠĠĠĠĠĠĠ Ġ. concat Map Ġ{ Ġdatabase Manager . get Album ( it . album U Id ) Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠgetUser By Photo Id ( photo U Id : ĠU Id ): ĠFlow able < Raw User > Ġ= Ġget Album By Photo Id ( photo U Id ) ĊĠĠĠĠĠĠĠ Ġ. subscribe On ( Schedulers . new Thread ()) ĊĠĠĠĠĠĠĠ Ġ. concat Map Ġ{ Ġdatabase Manager . getUser ( it . user U Id ) Ġ} Ċ }