package Ġcom . ep am . br n . service . impl Ċ Ċ import Ġcom . ep am . br n . dto . Head phones Dto Ċ import Ġcom . ep am . br n . model . Head phones Ċ import Ġcom . ep am . br n . repo . Head phones Repository Ċ import Ġcom . ep am . br n . service . Head phones Service Ċ import Ġorg . springframework . stereotype . Service Ċ Ċ @ Service Ċ class ĠHead phones ServiceImpl ( private Ġvar Ġhead phones Repository : ĠHead phones Repository ) Ġ: ĠHead phones Service Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġsave ( head phones : ĠHead phones ): ĠHead phones Dto Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġhead phones Repository . save ( head phones ). to Dto () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠgetAll Head phones ForUser ( userId : ĠLong ): ĠSet < Head phones Dto > Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġhead phones Repository . get Head phones ForUser ( userId ). map Ġ{ Ġit . to Dto () Ġ}. toSet () ĊĠĠĠ Ġ} Ċ } Ċ