package Ġtop . z be boy . isy . service . intern ship Ċ Ċ import Ġorg . jooq . DSL Context Ċ import Ġorg . jooq . Record Ċ import Ġorg . jooq . Result Ċ import Ġorg . springframework . beans . factory . annotation . Autowired Ċ import Ġorg . springframework . stereotype . Service Ċ import Ġorg . springframework . transaction . annotation . Propagation Ċ import Ġorg . springframework . transaction . annotation . Transactional Ċ Ċ import Ġtop . z be boy . isy . domain . Tables .* Ċ import Ġtop . z be boy . isy . domain . tables . records . Intern ship Release Science Record Ċ import Ġjava . util .* Ċ Ċ /** Ċ Ġ* ĠCreated Ġby Ġz be boy Ġ 2 0 1 7 - 1 2 - 2 0 Ġ. Ċ Ġ**/ Ċ @ Service (" intern ship Release Science Service ") Ċ @ Transactional ( propagation Ġ= ĠPro pagation . SUPPORT S , ĠreadOnly Ġ= Ġtrue ) Ċ open Ġclass ĠIntern ship Release Science ServiceImpl Ġ@ Autowired Ġconstructor ( dsl Context : ĠDSL Context ) Ġ: Intern ship Release Science Service Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġcreate : ĠDSL Context Ġ= Ġd sl Context ĊĊĠĠĠ Ġ@ Transactional ( propagation Ġ= ĠPro pagation . REQUIRED , ĠreadOnly Ġ= Ġfalse ) ĊĠĠĠ Ġoverride Ġfun Ġsave ( intern ship Release Id : ĠString , Ġscience Id : ĠInt ) Ġ{ ĊĠĠĠĠĠĠĠ Ġcreate . insert Into ( INTER N SHIP _ RELEASE _ SCI ENCE ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. set ( INTER N SHIP _ RELEASE _ SCI ENCE . INTER N SHIP _ RELEASE _ ID , Ġintern ship Release Id ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. set ( INTER N SHIP _ RELEASE _ SCI ENCE . SCI ENCE _ ID , Ġscience Id ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. execute () ĊĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠfindBy Intern ship Release Id Relation ( intern ship Release Id : ĠString ): ĠResult < Record > Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġcreate . select () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. from ( INTER N SHIP _ RELEASE _ SCI ENCE ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. join ( SCI ENCE ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. on ( INTER N SHIP _ RELEASE _ SCI ENCE . SCI ENCE _ ID . eq ( SCI ENCE . SCI ENCE _ ID )) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. where ( INTER N SHIP _ RELEASE _ SCI ENCE . INTER N SHIP _ RELEASE _ ID . eq ( intern ship Release Id )) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. fetch () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠfindBy Intern ship Release Id ( intern ship Release Id : ĠString ): ĠResult < Intern ship Release Science Record > Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġcreate . select From ( INTER N SHIP _ RELEASE _ SCI ENCE ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. where ( INTER N SHIP _ RELEASE _ SCI ENCE . INTER N SHIP _ RELEASE _ ID . eq ( intern ship Release Id )) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. fetch () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġfind In Science Id And Grade Ne Intern ship Release Id ( grade : ĠString , Ġscience Ids : ĠList < Int >, Ġintern ship Release Id : ĠString ): ĠResult < Record > Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġcreate . select () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. from ( INTER N SHIP _ RELEASE _ SCI ENCE ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. join ( INTER N SHIP _ RELEASE ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. on ( INTER N SHIP _ RELEASE _ SCI ENCE . INTER N SHIP _ RELEASE _ ID . eq ( INTER N SHIP _ RELEASE . INTER N SHIP _ RELEASE _ ID )) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. where ( INTER N SHIP _ RELEASE . ALLOW _ GR ADE . eq ( grade ). and ( INTER N SHIP _ RELEASE _ SCI ENCE . SCI ENCE _ ID .` in `( science Ids )). and ( INTER N SHIP _ RELEASE _ SCI ENCE . INTER N SHIP _ RELEASE _ ID . ne ( intern ship Release Id ))) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. fetch () ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠfindBy Intern ship Release Id And Science Id ( intern ship Release Id : ĠString , Ġscience Id : ĠInt ): ĠOptional < Record > Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġcreate . select () ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. from ( INTER N SHIP _ RELEASE _ SCI ENCE ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. where ( INTER N SHIP _ RELEASE _ SCI ENCE . INTER N SHIP _ RELEASE _ ID . eq ( intern ship Release Id ) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. and ( INTER N SHIP _ RELEASE _ SCI ENCE . SCI ENCE _ ID . eq ( science Id ))) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. fetch Optional () ĊĠĠĠ Ġ} Ċ }