/* Ċ Ġ* ĠCopyright Ġ 2 0 1 9 ĠF rol lo Ċ Ġ* Ċ Ġ* ĠLicensed Ġunder Ġthe ĠApache ĠLicense , ĠVersion Ġ 2 . 0 Ġ( the Ġ" License "); Ċ Ġ* Ġyou Ġmay Ġnot Ġuse Ġthis Ġfile Ġexcept Ġin Ġcompliance Ġwith Ġthe ĠLicense . Ċ Ġ* ĠYou Ġmay Ġobtain Ġa Ġcopy Ġof Ġthe ĠLicense Ġat Ċ Ġ* Ċ Ġ* ĠĠĠ Ġhttp :// www . apache . org / licenses / LICENSE - 2 . 0 Ċ Ġ* Ċ Ġ* ĠUnless Ġrequired Ġby Ġapplicable Ġlaw Ġor Ġagreed Ġto Ġin Ġwriting , Ġsoftware Ċ Ġ* Ġdistributed Ġunder Ġthe ĠLicense Ġis Ġdistributed Ġon Ġan Ġ" AS ĠIS " ĠBASIS , Ċ Ġ* ĠWITHOUT ĠWARRANTIES ĠOR ĠCONDITIONS ĠOF ĠANY ĠKIND , Ġeither Ġexpress Ġor Ġimplied . Ċ Ġ* ĠSee Ġthe ĠLicense Ġfor Ġthe Ġspecific Ġlanguage Ġgoverning Ġpermissions Ġand Ċ Ġ* Ġlimitations Ġunder Ġthe ĠLicense . Ċ Ġ*/ Ċ Ċ package Ġus . f rol lo . f rol lo sdk . database . dao Ċ Ċ import Ġandroidx . lifecycle . LiveData Ċ import Ġandroidx . room . Dao Ċ import Ġandroidx . room . Insert Ċ import Ġandroidx . room . On Conflict Strategy Ċ import Ġandroidx . room . Query Ċ import Ġandroidx . room . Raw Query Ċ import Ġandroidx . room . Transaction Ċ import Ġandroidx . sqlite . db . Support SQLite Query Ċ import Ġio . reactivex . Observable Ċ import Ġus . f rol lo . f rol lo sdk . model . core data . budget s . Budget Ċ import Ġus . f rol lo . f rol lo sdk . model . core data . budget s . Budget Relation Ċ Ċ @ Dao Ċ internal Ġinterface ĠBudget Dao Ġ{ ĊĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġbudget ") ĊĠĠĠ Ġfun Ġload (): ĠLive Data < List < Budget >> ĊĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġbudget ĠWHERE Ġbudget _ id Ġ= Ġ: bud getId ") ĊĠĠĠ Ġfun Ġload ( bud getId : ĠLong ): ĠLive Data < Budget ?> ĊĊĠĠĠ Ġ@ Raw Query ( observed Entities Ġ= Ġ[ Budget :: class ]) ĊĠĠĠ Ġfun Ġload By Query ( query Str : ĠSupport SQLite Query ): ĠLive Data < List < Budget >> ĊĊĠĠĠ Ġ@ Insert ( on Conflict Ġ= ĠOn Conflict Strategy . REPLACE ) ĊĠĠĠ Ġfun Ġinsert All ( var arg Ġmodels : ĠBudget ): ĠLong Array ĊĊĠĠĠ Ġ@ Insert ( on Conflict Ġ= ĠOn Conflict Strategy . REPLACE ) ĊĠĠĠ Ġfun Ġinsert ( model : ĠBudget ): ĠLong ĊĊĠĠĠ Ġ@ Raw Query ĊĠĠĠ Ġfun Ġget Ids By Query ( query Str : ĠSupport SQLite Query ): ĠList < Long > ĊĊĠĠĠ Ġ@ Query (" DELETE ĠFROM Ġbudget ĠWHERE Ġbudget _ id ĠIN Ġ(: budget Ids )") ĊĠĠĠ Ġfun Ġdelete Many ( budget Ids : ĠLong Array ) ĊĊĠĠĠ Ġ@ Query (" DELETE ĠFROM Ġbudget ĠWHERE Ġbudget _ id Ġ= Ġ: bud getId ") ĊĠĠĠ Ġfun Ġdelete ( bud getId : ĠLong ) ĊĊĠĠĠ Ġ@ Query (" DELETE ĠFROM Ġbudget ") ĊĠĠĠ Ġfun Ġclear () ĊĊĠĠĠ Ġ// ĠRelation Ġmethods ĊĠĠĠ Ġ@ Transaction ĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġbudget ") ĊĠĠĠ Ġfun Ġload With Relation (): ĠLive Data < List < Budget Relation >> ĊĊĠĠĠ Ġ@ Transaction ĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġbudget ĠWHERE Ġbudget _ id Ġ= Ġ: bud getId ") ĊĠĠĠ Ġfun Ġload With Relation ( bud getId : ĠLong ): ĠLive Data < Budget Relation ?> ĊĊĠĠĠ Ġ@ Transaction ĊĠĠĠ Ġ@ Raw Query ( observed Entities Ġ= Ġ[ Budget Relation :: class ]) ĊĠĠĠ Ġfun Ġload By Query With Relation ( query Str : ĠSupport SQLite Query ): ĠLive Data < List < Budget Relation >> ĊĊĠĠĠ Ġ/** ĊĠĠĠĠ Ġ* ĠRx Java ĠReturn ĠTypes ĊĠĠĠĠ Ġ*/ ĊĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġbudget ") ĊĠĠĠ Ġfun Ġload Rx (): ĠObservable < List < Budget >> ĊĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġbudget ĠWHERE Ġbudget _ id Ġ= Ġ: bud getId ") ĊĠĠĠ Ġfun Ġload Rx ( bud getId : ĠLong ): ĠObservable < Budget ?> ĊĊĠĠĠ Ġ@ Raw Query ( observed Entities Ġ= Ġ[ Budget :: class ]) ĊĠĠĠ Ġfun Ġload By Query Rx ( query Str : ĠSupport SQLite Query ): ĠObservable < List < Budget >> ĊĊĠĠĠ Ġ// ĠRelation Ġmethods ĊĠĠĠ Ġ@ Transaction ĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġbudget ") ĊĠĠĠ Ġfun Ġload With Relation Rx (): ĠObservable < List < Budget Relation >> ĊĊĠĠĠ Ġ@ Transaction ĊĠĠĠ Ġ@ Query (" SELECT Ġ* ĠFROM Ġbudget ĠWHERE Ġbudget _ id Ġ= Ġ: bud getId ") ĊĠĠĠ Ġfun Ġload With Relation Rx ( bud getId : ĠLong ): ĠObservable < Budget Relation ?> ĊĊĠĠĠ Ġ@ Transaction ĊĠĠĠ Ġ@ Raw Query ( observed Entities Ġ= Ġ[ Budget Relation :: class ]) ĊĠĠĠ Ġfun Ġload By Query With Relation Rx ( query Str : ĠSupport SQLite Query ): ĠObservable < List < Budget Relation >> Ċ } Ċ