package persistence.service;

public class UserService {

}

@@ -27,34 +27,556 @@
 e;%0A%0A
-public class UserService %7B%0A%0A%7D
+import java.util.List;%0A%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.stereotype.Component;%0A%0Aimport persistence.dao.UserDAO;%0Aimport persistence.model.User;%0A%0A@Component%0Apublic class UserService %7B%0A%09private UserDAO userDao;%0A%09%0A%09public UserDAO getUserDAO()%7B%0A%09%09return userDao;%0A%09%7D%0A%09%0A%09@Autowired%0A%09public void setUserDao(UserDAO userDao) %7B%0A%09this.userDao = userDao;%0A%09%7D%0A%09 %0A%09public void addUser(User user) %7B%0A%09%09getUserDAO().insert(user);%0A%09%7D%0A%09 %0A%09public List%3CUser%3E fetchAllUsers() %7B%0A%09return getUserDAO().selectAll();%0A%09%7D%0A%7D%0A
 %0A

Implement User Service