package Ġru . flower net es . team . domain . use case Ċ Ċ import Ġorg . springframework . stereotype . Component Ċ import Ġru . flower net es . entity . auth . User Ċ import Ġru . flower net es . entity . team . Team Ċ import Ġru . flower net es . team . api . domain . entity . No Team Linked With User Exception Ċ import Ġru . flower net es . team . api . domain . use case . Get Team ByUser UseCase Ċ import Ġru . flower net es . team . data . repo . Team UserRepository Ċ Ċ @ Component Ċ class ĠGet Team ByUser UseCase Impl ( ĊĠ Ġprivate Ġval Ġteam UserRepository : ĠTeam UserRepository Ċ ) Ġ: ĠGet Team ByUser UseCase Ġ{ ĊĊĠĠĠ Ġoverride Ġfun Ġexec ( user : ĠUser ): ĠTeam Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġteam User Ġ= Ġteam UserRepository . findBy User ( user ) Ġ?: Ġthrow ĠNo Team Linked With User Exception ( user ) ĊĠĠĠĠĠĠĠ Ġreturn Ġteam User . team ĊĠĠĠ Ġ} Ċ }