package Ġcom . oc ak m ali . bre ww ay . added it recipe . co ffe em aker Ċ Ċ import Ġandroidx . lifecycle . LiveData Ċ import Ġandroidx . lifecycle . Transform ations Ċ import Ġandroidx . paging . Paged List Ċ import Ġandroidx . paging . to LiveData Ċ import Ġcom . oc ak m ali . bre ww ay . added it recipe . base . Abstract Search Equipment ViewModel Ċ import Ġcom . oc ak m ali . bre ww ay . datamodel . C offee Maker View Ċ import Ġcom . oc ak m ali . bre ww ay . datamodel . to View Ċ import Ġcom . oc ak m ali . domain . inter actor . C offee Maker Inter Actor Ċ import Ġcom . oc ak m ali . domain . model . C offee Maker Ċ Ċ class ĠSearch C offee Maker ViewModel ( private Ġval Ġinter Actor : ĠC offee Maker Inter Actor ) ĊĠĠĠ Ġ: ĠAbstract Search Equipment ViewModel < C offee Maker >() Ġ{ ĊĊĠĠĠ Ġval Ġcoffee M ak ers : ĠLive Data < Paged List < C offee Maker View >> Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ ĠTransform ations . switch Map ( search Result ) Ġ{ ĠdataSource Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ ĠdataSource . map Ġ{ Ġcoffee Maker -> ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġcoffee Maker . to View () Ġ}. to LiveData ( 1 5 ) Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġsearch ( query : ĠString ) Ġ= Ġinter Actor . search C offee M ak ers ( query ) ĊĊĠĠĠ Ġoverride Ġfun Ġload Everything () Ġ= Ġinter Actor . load C offee M ak ers () Ċ } Ċ