package Ġcom . mo ony . calc . data čĊč Ċ import Ġandroidx . lifecycle . LiveData č Ċ import Ġcom . mo ony . calc . database . Category Dao č Ċ import Ġcom . mo ony . calc . model . Category č Ċ import Ġjavax . inject . Inject čĊč Ċ class ĠCategory Repository Ġ@ Inject Ġconstructor ( private Ġvar Ġcategory Dao : ĠCategory Dao ) Ġ{ čĊčĊĠĠĠ Ġfun ĠgetAll Category ( isIn come : ĠBoolean ): ĠLive Data < List < Category >> Ġ= category Dao . getAll Category ( isIn come ) čĊčĊĠĠĠ Ġfun Ġget Category ( id : ĠString ): ĠLive Data < Category > Ġ= Ġcategory Dao . get Category ( id ) čĊĠĠĠ Ġfun Ġget Saving Category ( isIn come : ĠBoolean , Ġres Id : ĠInt )= category Dao . getS aving Category ( isIn come , Ġres Id ) čĊčĊčĊĠĠĠ Ġsuspend Ġfun Ġinsert Category ( category : ĠCategory ) Ġ= Ġcategory Dao . insert Category ( category ) čĊčĊĠĠĠ Ġsuspend Ġfun Ġdelete Category ( category : ĠCategory ) Ġ= Ġcategory Dao . delete Category ( category ) čĊčĊĠĠĠ Ġsuspend Ġfun Ġupdate Category ( category : ĠCategory ) Ġ= Ġcategory Dao . update Category ( category ) č Ċ }