package Ġcom . im ma . service . console Ċ Ċ import Ġcom . im ma . model . Collection Names Ċ import Ġcom . im ma . model . console . Favorite Ċ import Ġcom . im ma . service . Service Ċ import Ġcom . im ma . service . Services Ċ Ċ class ĠF avorite Service ( services : ĠServices ) Ġ: ĠService ( services ) Ġ{ Ċ ĉ fun Ġfind Favorite ById ( userId : ĠString ): ĠF avorite ? Ġ{ Ċĉ ĉ return Ġpersist (). findById ( userId , ĠF avorite :: class . java , ĠCollection Names . FA V OR ITE ) Ċ ĉ } ĊĊ ĉ fun Ġsave Favorite ( favorite : ĠF avorite ) Ġ{ Ċĉ ĉ persist (). upsert One ( favorite , ĠF avorite :: class . java , ĠCollection Names . FA V OR ITE ) Ċ ĉ } Ċ }