package Ġcom . m aly . domain . play Ċ Ċ import Ġcom . m aly . domain . play . Play Specification . Companion . for Building Ċ import Ġcom . m aly . domain . play . Play Specification . Companion . for Distinct Ċ import Ġcom . m aly . domain . play . Play Specification . Companion . for Future Date Ċ import Ġcom . m aly . domain . play . Play Specification . Companion . for Title Ċ import Ġorg . springframework . data . jpa . domain . Spec ifications Ċ import Ġorg . springframework . stereotype . Service Ċ Ċ /** Ċ Ġ* Ġ@ author ĠAle ks ander ĠBr zo z owski Ċ Ġ*/ Ċ @ Service Ċ class ĠPlay Service ( private Ġval Ġplay Repository : ĠPlay Repository ) Ġ{ ĊĊĠĠĠ Ġfun Ġget Play sBy Building Id ( building Id : ĠLong ): ĠList < Play > Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġspecifications Ġ= ĠSpec ifications . where ( for Building ( building Id Ġ= Ġbuilding Id )) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. and ( for Future Date ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. and ( for Distinct ()) ĊĊĠĠĠĠĠĠĠ Ġreturn Ġplay Repository . findAll ( spec ifications ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġget Play sBy Query ( query : ĠString ): ĠList < Play > Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġspecifications Ġ= ĠSpec ifications . where ( for Future Date ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. and ( for Title ( query )) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. and ( for Distinct ()) ĊĠĠĠĠĠĠĠ Ġreturn Ġplay Repository . findAll ( spec ifications ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġfun Ġget Play s (): ĠList < Play > Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġspecifications Ġ= ĠSpec ifications . where ( for Future Date ()) ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ. and ( for Distinct ()) ĊĠĠĠĠĠĠĠ Ġreturn Ġplay Repository . findAll ( spec ifications ) ĊĠĠĠ Ġ} Ċ }