package Ġio . github . iv v ve . book manager . domain . account . domain . account Ċ Ċ import Ġio . github . iv v ve . book manager . common . annotations . Domain Service Ċ import Ġio . github . iv v ve . book manager . domain . account . domain . account . entities . Account Ċ import Ġio . github . iv v ve . book manager . domain . account . domain . account . exceptions . D uplicated Email Exception Ċ Ċ @ Domain Service Ċ class ĠD uplicated Account Checker ( ĊĠĠĠ Ġprivate Ġval Ġaccount Repository : ĠAccount Repository Ċ ) Ġ{ ĊĠĠĠ Ġfun Ġcheck ( account : ĠAccount ) Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġaccount Ġ= Ġthis . account Repository . findBy Email ( account . email ) ĊĊĠĠĠĠĠĠĠ Ġif Ġ( account Ġ!= Ġnull ) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġthrow ĠD uplicated Email Exception () ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} Ċ } Ċ