/** Ċ Ġ* Ċ Ġ* ĠCopyright Ġ 2 0 2 1 Ġp ao lo Ġmo co cc i Ċ Ġ* Ċ Ġ* ĠLicensed Ġunder Ġthe ĠApache ĠLicense , ĠVersion Ġ 2 . 0 Ġ( the Ġ" License "); Ċ Ġ* Ġyou Ġmay Ġnot Ġuse Ġthis Ġfile Ġexcept Ġin Ġcompliance Ġwith Ġthe ĠLicense . Ċ Ġ* ĠYou Ġmay Ġobtain Ġa Ġcopy Ġof Ġthe ĠLicense Ġat Ċ Ġ* Ċ Ġ* Ġĉ ĠĠ Ġhttp :// www . apache . org / licenses / LICENSE - 2 . 0 Ċ Ġ* Ċ Ġ* ĠUnless Ġrequired Ġby Ġapplicable Ġlaw Ġor Ġagreed Ġfollowing Ġin Ġwriting , Ġsoftware Ċ Ġ* Ġdistributed Ġunder Ġthe ĠLicense Ġis Ġdistributed Ġon Ġan Ġ" AS ĠIS " ĠBASIS , Ċ Ġ* ĠWITHOUT ĠWARRANTIES ĠOR ĠCONDITIONS ĠOF ĠANY ĠKIND , Ġeither Ġexpress Ġor Ġimplied . Ċ Ġ* ĠSee Ġthe ĠLicense Ġfor Ġthe Ġspecific Ġlanguage Ġgoverning Ġpermissions Ġand Ċ Ġ* Ġlimitations Ġunder Ġthe ĠLicense . Ċ Ġ* Ċ Ġ*/ Ċ Ċ package Ġlocal . example . staff . assembler Ċ Ċ import Ġlocal . example . staff . controller . Task Rest ful Controller Ċ import Ġlocal . example . staff . entity . Task Entity Ċ Ċ import Ġorg . springframework . h ate o as . Entity Model Ċ import Ġorg . springframework . h ate o as . server . Representation Model Assembler Ċ import Ġorg . springframework . h ate o as . server . mvc . Web Mvc Link Builder . link To Ċ import Ġorg . springframework . h ate o as . server . mvc . Web Mvc Link Builder . method On Ċ import Ġorg . springframework . stereotype . Component Ċ Ċ @ Component Ċ class ĠTask Representation Model Assembler Ġ: ĊĠĠĠ ĠRepresentation Model Assembler < Task Entity , ĠEntity Model < Task Entity >> Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġto Model ( task Entity : ĠTask Entity ): ĠEntity Model < Task Entity > Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn ĠEntity Model . of ( task Entity , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġlink To ( method On ( Task Rest ful Controller :: class . java ). read ( task Entity . id )). with Self Rel (), ĊĠĠĠĠĠĠĠĠĠĠĠ Ġlink To ( method On ( Task Rest ful Controller :: class . java ). read All ()). with Rel (" tasks ") ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ} Ċ } Ċ