package com.github.nagaseyasuhito.gymnaster.service;

import javax.inject.Inject;
import javax.transaction.Transactional;
import javax.validation.constraints.NotNull;

import com.github.nagaseyasuhito.gymnaster.UserNotFoundException;
import com.github.nagaseyasuhito.gymnaster.dao.UserDao;
import com.github.nagaseyasuhito.gymnaster.entity.User;

@Transactional
public class UserService {

	@Inject
	private UserDao userDao;

	public User register(@NotNull String mailAddress) {
		User user = new User();
		user.setMailAddress(mailAddress);

		this.userDao.persist(user);
		return user;
	}

	public User show(@NotNull Integer id) {
		return this.userDao.findById(id).orElseThrow(() -> new UserNotFoundException(id));
	}
}

@@ -165,74 +165,8 @@
 l;%0A%0A
-import com.github.nagaseyasuhito.gymnaster.UserNotFoundException;%0A
 impo
@@ -520,137 +520,7 @@
 ;%0A%09%7D
-%0A%0A%09public User show(@NotNull Integer id) %7B%0A%09%09return this.userDao.findById(id).orElseThrow(() -%3E new UserNotFoundException(id));%0A%09%7D
 %0A%7D%0A

remove unused method