package Ġcom . mand ay . fruit . datasource . database Ċ Ċ import Ġandroidx . lifecycle . LiveData Ċ import Ġcom . mand ay . fruit . controllers . F ruit Room Controller Ċ import Ġcom . mand ay . fruit . dao . F ruit Dao Ċ import Ġcom . mand ay . fruit . entities . F ruit Entity Ċ Ċ class ĠF ruit Room DataSource Ġ: ĠF ruit Database DataSource Ġ{ ĊĊĠĠĠ Ġprivate Ġvar Ġfruit Dao : ĠF ruit Dao ? Ġ= Ġnull ĊĊĠĠĠ Ġinit Ġ{ ĊĠĠĠĠĠĠĠ Ġfruit Dao Ġ= ĠF ruit Room Controller . getInstance ()?. fruit Dao () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠgetAll Local F ru its (): ĠLive Data < List < F ruit Entity > ?> ? Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġfruit Dao ?. getAll F ru its () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġadd F ru its ( list : ĠList < F ruit Entity >) Ġ{ ĊĠĠĠĠĠĠĠ Ġfruit Dao ?. insert ( list ) ĊĠĠĠ Ġ} Ċ }