Ejemplo n.º 1
0
 private void throwExceptionIfBirthNumberExists(String birthNumber) throws UserAlreadyExists {
   Long id = userDao.getIdByBirthNumber(birthNumber);
   if (id > 0) {
     throw new UserAlreadyExists("User already exists!");
   }
 }