package Ġcom . car los di est ro . job application manager . datasource . resp ositor ies Ċ Ċ import Ġandroidx . lifecycle . Mutable LiveData Ċ import Ġcom . car los di est ro . job application manager . datasource . entities . Job Application Ċ import Ġcom . car los di est ro . job application manager . interfaces . IM ain Repository Ċ import Ġcom . car los di est ro . job application manager . utils . Constants . PENDING _ STATUS Ċ Ċ class ĠMain Repository Mock Ġ: ĠI Main Repository Ġ{ ĊĊĠĠĠ Ġprivate Ġvar Ġall Job Application List Ġ= Ġmutable ListOf < Job Application >() ĊĠĠĠ Ġprivate Ġvar Ġpending Job Application List Ġ= Ġmutable ListOf < Job Application >() ĊĠĠĠ Ġprivate Ġvar Ġaccepted Job Application List Ġ= Ġmutable ListOf < Job Application >() ĊĠĠĠ Ġprivate Ġvar Ġrejected Job Application List Ġ= Ġmutable ListOf < Job Application >() ĊĊĠĠĠ Ġprivate Ġval Ġobservable All Job Applications Ġ= ĊĠĠĠĠĠĠĠ ĠMutable LiveData < List < Job Application >>( all Job Application List ) ĊĠĠĠ Ġprivate Ġval Ġobservable Pending Job Applications Ġ= ĊĠĠĠĠĠĠĠ ĠMutable LiveData < List < Job Application >>( pending Job Application List ) ĊĠĠĠ Ġprivate Ġval Ġobservable Accepted Job Applications Ġ= ĊĠĠĠĠĠĠĠ ĠMutable LiveData < List < Job Application >>( accepted Job Application List ) ĊĠĠĠ Ġprivate Ġval Ġobservable Rejected Job Applications Ġ= ĊĠĠĠĠĠĠĠ ĠMutable LiveData < List < Job Application >>( rejected Job Application List ) ĊĊĠĠĠ Ġoverride Ġsuspend Ġfun Ġinsert Job Application ( job Application : ĠJob Application ) Ġ{ ĊĠĠĠĠĠĠĠ Ġall Job Application List . add ( job Application ) ĊĠĠĠĠĠĠĠ Ġrefresh LiveData () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġsuspend Ġfun Ġupdate Job Application ( job Application : ĠJob Application ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġindex Ġ= Ġall Job Application List . indexOf ( job Application ) ĊĠĠĠĠĠĠĠ Ġall Job Application List . apply Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġremove At ( index ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġadd ( index , Ġjob Application ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġrefresh LiveData () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġsuspend Ġfun Ġclear Non Pending Job Applications () Ġ{ ĊĠĠĠĠĠĠĠ Ġall Job Application List Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ( all Job Application List . filter Ġ{ Ġjob Application Ġ-> Ġjob Application . status Ġ== ĠP ENDING _ STATUS Ġ}). to Mutable List () ĊĠĠĠĠĠĠĠ Ġrefresh LiveData () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠgetAll () Ġ= Ġobservable All Job Applications ĊĊĊĠĠĠ Ġoverride Ġfun Ġget Pending Job Applications () Ġ= Ġobservable Pending Job Applications ĊĊĊĠĠĠ Ġoverride Ġfun Ġget Accepted Job Applications () Ġ= Ġobservable Accepted Job Applications ĊĊĊĠĠĠ Ġoverride Ġfun Ġget Rejected Job Applications () Ġ= Ġobservable Rejected Job Applications ĊĊĠĠĠ Ġprivate Ġfun Ġrefresh LiveData () Ġ{ ĊĠĠĠĠĠĠĠ Ġobservable All Job Applications . post Value ( all Job Application List ) ĊĠĠĠ Ġ} Ċ }