package Ġcom . alex tom ala . search Demo . repository Ċ Ċ import Ġcom . alex tom ala . search Demo . model . Organization Ċ import Ġorg . springframework . data . jpa . domain . Specification Ċ import Ġorg . springframework . data . jpa . repository . Jpa Specification Executor Ċ import Ġorg . springframework . data . repository . Crud Repository Ċ import Ġjavax . persistence . criteria . Criteria Builder Ċ import Ġjavax . persistence . criteria . Criteria Query Ċ import Ġjavax . persistence . criteria . Predicate Ċ import Ġjavax . persistence . criteria . Root Ċ import Ġkotlin . reflect . full . member Properties Ċ Ċ interface ĠOrganization Repository Ġ: ĠCr ud Repository < Organization , ĠInt >, ĠJ pa Specification Executor < Organization > Ċ Ċ class ĠOrganization Specification ( private Ġval Ġoptions : ĠList < String >) Ġ: ĠSpecification < Organization >, ĠBase Repository < Organization >() Ġ{ ĊĠĠĠ Ġoverride Ġfun Ġto Predicate ( root : ĠRoot < Organization >, Ġquery : ĠCriteria Query <* >, Ġbuilder : ĠCriteria Builder ): ĠPredicate ? Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġqueries Ġ= Ġfield Query To Criteria ( root , Ġbuilder , ĠOrganization :: class . member Properties , Ġoptions ) ĊĠĠĠĠĠĠĠ Ġquery . distinct ( true ) ĊĠĠĠĠĠĠĠ Ġreturn Ġbuilder . and (* queries . to Typed Array < Predicate >()) ĊĠĠĠ Ġ} Ċ } Ċ