public void delete(String id) { User user = userService.getById(id); Response r; if (user != null) { userService.deleteById(id); } }
public void update(User user) { User u = userService.getById(user.getId()); if (u != null) { u.setName(user.getName()); u.setEmail(user.getEmail()); userService.update(u); } }
public void update(String id, String name, String email) { User user = new User(); user.setId(id); user.setName(name); user.setEmail(email); userService.update(user); }
public void delete(String id) { userService.deleteById(id); }
public void create(String name, String email) { User user = new User(); user.setName(name); user.setEmail(email); userService.create(user); }
public List<User> getList() { return userService.getList(); }
public void addUser(User user) { userService.create(user); }
public User get(String id) { return userService.getById(id); }
public UserListOutputType getList() { UserListOutputType userListOutputType = new UserListOutputType(); userListOutputType.getUser().addAll(userService.getList()); return userListOutputType; }