package Ġcom . ep am . demo . jooq contest . service Ċ Ċ import Ġcom . ep am . jooq . tables . records . Product Record Ċ import Ġcom . ep am . demo . jooq contest . dto . Product Dto Ċ import Ġcom . ep am . demo . jooq contest . repository . Product Repository Ċ import Ġorg . springframework . stereotype . Service Ċ import Ġorg . springframework . transaction . annotation . Transactional Ċ Ċ @ Service Ċ class ĠProduct Service ( private Ġval Ġproduct Repository : ĠProduct Repository ) Ġ{ ĊĊĠĠĠ Ġfun ĠfindAll (): ĠList < Product Dto >? Ġ= Ġproduct Repository . findAll ()?. map Ġ{ Ġit . convert () Ġ} ĊĊĠĠĠ Ġfun Ġfind One ( name : ĠString ): ĠProduct Dto ? Ġ= Ġproduct Repository . findOne ( name )?. convert () ĊĊĠĠĠ Ġfun Ġfind Description ( name : ĠString ): ĠString ? Ġ= Ġproduct Repository . find Description ( name ) ĊĊĠĠĠ Ġ@ Transactional ĊĠĠĠ Ġfun Ġsave ( product Dto : ĠProduct Dto ) Ġ{ Ġproduct Repository . create ( product Dto ) Ġ} ĊĊĠĠĠ Ġfun ĠProduct Record . convert (): ĠProduct Dto Ġ= ĊĠĠĠĠĠĠĠ ĠProduct Dto ( this . id , Ġthis . name , Ġthis . price , Ġthis . categoryId , Ġthis . vendor , Ġnull , Ġnull ) Ċ Ċ } Ċ