package Ġcom . github . ep hel sa . my care er . delivery . shared . local Ċ Ċ import Ġandroid . content . Context Ċ import Ġandroidx . room . Database Ċ import Ġandroidx . room . Room Ċ import Ġandroidx . room . Room Database Ċ import Ġandroidx . room . Type Converters Ċ import Ġcom . github . ep hel sa . my care er . delivery . auth . entity . Session Entity Ċ import Ġcom . github . ep hel sa . my care er . delivery . auth . local . Auth Dao Ċ import Ġcom . github . ep hel sa . my care er . delivery . survey . entity . Question Answer Entity Ċ import Ġcom . github . ep hel sa . my care er . delivery . survey . entity . Question Entity Ċ import Ġcom . github . ep hel sa . my care er . delivery . survey . entity . User Answer Entity Ċ import Ġcom . github . ep hel sa . my care er . delivery . survey . local . Survey Dao Ċ import Ġcom . github . ep hel sa . my care er . delivery . user . entity . UserInfo Entity Ċ import Ġcom . github . ep hel sa . my care er . delivery . user . local . User Dao Ċ Ċ @ Database ( ĊĠĠĠ Ġentities Ġ= Ġ[ ĊĠĠĠĠĠĠĠ ĠSession Entity :: class , ĊĠĠĠĠĠĠĠ ĠQuestion Entity :: class , ĊĠĠĠĠĠĠĠ ĠQuestion Answer Entity :: class , ĊĠĠĠĠĠĠĠ ĠUserInfo Entity :: class , ĊĠĠĠĠĠĠĠ ĠUser Answer Entity :: class ĊĠĠĠ Ġ], ĊĠĠĠ Ġversion Ġ= Ġ 4 , ĊĠĠĠ Ġexport Schema Ġ= Ġfalse Ċ ) Ċ @ Type Converters ( Converters :: class ) Ċ abstract Ġclass ĠMy Care er Database Ġ: ĠRoom Database () Ġ{ ĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠĠĠĠĠ Ġprivate Ġconst Ġval ĠDATABASE _ NAME Ġ= Ġ" my - care er " ĊĊĠĠĠĠĠĠĠ Ġ@ Volatile ĊĠĠĠĠĠĠĠ Ġprivate Ġvar Ġinstance : ĠMy Care er Database ? Ġ= Ġnull ĊĊĠĠĠĠĠĠĠ Ġfun ĠgetInstance ( context : ĠContext ): ĠMy Care er Database Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn Ġinstance Ġ?: Ġsynchronized ( this ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġinstance Ġ?: Ġbuild Database ( context ). also Ġ{ Ġinstance Ġ= Ġit Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĊĠĠĠĠĠĠĠ Ġprivate Ġfun Ġbuild Database ( context : ĠContext ): ĠMy Care er Database Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġreturn ĠRoom . database Builder ( context , ĠMy Care er Database :: class . java , ĠDATABASE _ NAME ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. fallback To Dest ruct ive Migration () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. build () ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġabstract Ġfun Ġauth Dao (): ĠAuth Dao ĊĠĠĠ Ġabstract Ġfun Ġsurvey Dao (): ĠSurvey Dao ĊĠĠĠ Ġabstract Ġfun Ġuser Dao (): ĠUser Dao Ċ } Ċ