package Ġcom . the test company . data . repositories Ċ Ċ import Ġcom . the test company . data . db . Receipt Dao Ċ import Ġcom . the test company . data . entities . Receipt Data Ċ import Ġcom . the test company . domain . Mapper Ċ import Ġcom . the test company . domain . Receipt Repository Ċ import Ġcom . the test company . domain . entities . Receipt Entity Ċ import Ġio . reactivex . Observable ĊĊ Ċ class ĠRe ceipt Repository Imp ( private Ġval Ġreceipt Dao : ĠRe ceipt Dao , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġprivate Ġval Ġdata Mapper : ĠMapper < Receipt Data , ĠRe ceipt Entity >, ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġprivate Ġval Ġentity Mapper : ĠMapper < Receipt Entity , ĠRe ceipt Data >): ĠRe ceipt Repository Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġget Receipt s (): ĠObservable < List < Receipt Entity >> Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠObservable . from Callable Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreceipt Dao . get Receipt s (). map { Ġdata Mapper . map From ( it ) Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġinsert Receipt ( receipt : ĠRe ceipt Entity ): ĠObservable < Long > Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠObservable . from Callable Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreceipt Dao . insert Receipt ( entity Mapper . map From ( receipt )) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ }