package Ġorg . step ik . android . cache . catalog Ċ Ċ import Ġio . reactivex . Comp letable Ċ import Ġio . reactivex . Maybe Ċ import Ġorg . step ik . android . cache . catalog . dao . Catalog Block Dao Ċ import Ġorg . step ik . android . data . catalog . source . Catalog Cache DataSource Ċ import Ġorg . step ik . android . domain . catalog . model . Catalog Block Ċ import Ġjavax . inject . Inject Ċ Ċ class ĠCatalog Cache DataSource Impl Ċ @ Inject Ċ constructor ( ĊĠĠĠ Ġprivate Ġval Ġcatalog Block Dao : ĠCatalog Block Dao Ċ ) Ġ: ĠCatalog Cache DataSource Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġget Catalog Blocks ( language : ĠString ): ĠMaybe < List < Catalog Block >> Ġ= ĊĠĠĠĠĠĠĠ Ġcatalog Block Dao ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. getC atalog Blocks ( language ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. filter ( List < Catalog Block >:: isNotEmpty ) ĊĊĠĠĠ Ġoverride Ġfun Ġinsert Catalog Blocks ( catalog Blocks : ĠList < Catalog Block >): ĠComp letable Ġ= ĊĠĠĠĠĠĠĠ Ġcatalog Block Dao ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. clear Catalog Blocks () ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ. and Then ( catalog Block Dao . insert Catalog Blocks ( catalog Blocks )) Ċ }