package Ġcom . example . demo . api . re ale state . routing . properties Ċ Ċ import Ġcom . example . demo . api . re ale state . handler . common . response . Property Response Ċ import Ġcom . example . demo . api . re ale state . handler . properties . crud . create . Create Property Handler Ċ import Ġcom . example . demo . api . re ale state . handler . properties . crud . create . Create Property Request Ċ import Ġcom . example . demo . api . re ale state . handler . properties . crud . get by id . GetProperty ById Handler Ċ import Ġcom . example . demo . api . re ale state . handler . properties . crud . search . Search Properties Handler Ċ import Ġcom . example . demo . api . re ale state . handler . properties . crud . search . Search Properties Request Ċ import Ġcom . example . demo . api . re ale state . handler . properties . crud . search . Search Properties Response Ċ import Ġcom . example . demo . api . re ale state . handler . properties . crud . update . Update Property Handler Ċ import Ġcom . example . demo . api . re ale state . handler . properties . crud . update . Update Property Request Ċ import Ġorg . springframework . web . bind . annotation .* Ċ import Ġjava . util .* Ċ Ċ @ RestController Ċ @ Cross Origin ( orig ins Ġ= ĠarrayOf ("* ")) Ċ class ĠProperties Crud Controller ( ĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġcreate Handler : ĠCreate Property Handler , ĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġupdate Handler : ĠUpdate Property Handler , ĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġget ById Handler : ĠGet Property ById Handler , ĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġsearch Handler : ĠSearch Properties Handler Ċ ) Ġ{ ĊĠĠĠ Ġ@ GetMapping ("/ properties /{ property Id }") ĊĠĠĠ Ġfun Ġget ById (@ PathVariable Ġproperty Id : ĠUUID ): ĠProperty Response Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġget ById Handler . handle ( property Id ) ĊĊĠĠĠ Ġ@ PostMapping ("/ properties ") ĊĠĠĠ Ġfun Ġcreate (@ RequestBody Ġrequest : ĠCreate Property Request ): ĠProperty Response Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġcreate Handler . handle ( request ) ĊĊĠĠĠ Ġ@ PostMapping ("/ properties /{ property Id }") ĊĠĠĠ Ġfun Ġupdate (@ PathVariable Ġproperty Id : ĠUUID , Ġ@ RequestBody Ġrequest : ĠUpdate Property Request ): ĠProperty Response Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġupdate Handler . handle ( property Id , Ġrequest ) ĊĊĠĠĠ Ġ@ PostMapping ("/ properties / search ") ĊĠĠĠ Ġfun Ġsearch (@ RequestBody Ġrequest : ĠSearch Properties Request ): ĠSearch Properties Response Ġ= ĊĠĠĠĠĠĠĠĠĠĠĠ Ġsearch Handler . handle ( request ) Ċ }