public void deleteUser(int id) { userRepository.delete(id); }
public User findUserByEmail(String email) { return userRepository.findUserByEmail(email); }
public User update(User user) { return userRepository.save(user); }
public User login(String email, String password) { // return userDao.login(email,password); // return userRepository.login(email,password); return userRepository.findByEmailAndPassword(email, password); }
public User findUserById(int id) { // return userDao.findUserById(id); return userRepository.findOne(id); }
public User create(User user) { // return userDao.create(user); return userRepository.save(user); }
/* @Autowired public UserService(UserDao userDao) { this.userDao = userDao; } */ public List<User> findAll() { // return userDao.findAll(); return userRepository.findAll(); }