Last active
March 14, 2024 21:44
-
-
Save jeanpierregomez/bf05ff491c86887695fd619f04f77a32 to your computer and use it in GitHub Desktop.
User use case
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RequiredArgsConstructor | |
public class UserUseCase { | |
private final UserRepository userRepository; | |
public User saveUser(User user) { | |
return userRepository.saveUser(user); | |
} | |
public User updateUser(User user) { | |
return userRepository.updateUser(user); | |
} | |
public void deleteUser(String id) { | |
userRepository.deleteUser(id); | |
} | |
public User getUser(String id) { | |
return userRepository.getUser(id); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment