Class UserServiceImpl
java.lang.Object
com.espacogeek.geek.services.impl.UserServiceImpl
- All Implemented Interfaces:
UserService
A Implementation class of UserService @see UserService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteById(Integer id) Delete user by Id provide.Retrieves a UserModel object by its ID.findByIdOrUsernameContainsOrEmail(Integer id, String username, String email) Retrieves a UserModel object by its id, username (partial match) and Email.findUserByEmail(String email) Retrieve a user by email.Saves a new UserModel object to the database.
-
Constructor Details
-
UserServiceImpl
public UserServiceImpl()
-
-
Method Details
-
findByIdOrUsernameContainsOrEmail
Description copied from interface:UserServiceRetrieves a UserModel object by its id, username (partial match) and Email.- Specified by:
findByIdOrUsernameContainsOrEmailin interfaceUserService- Parameters:
id- The id of the UserModel object to be retrieved.username- The username (partial) of the UserModel object to be retrieved.email- The email of the UserModel object to be retrieved.- Returns:
- An Optional containing the UserModel object if found, otherwise an empty Optional.
- See Also:
-
findById
Description copied from interface:UserServiceRetrieves a UserModel object by its ID.- Specified by:
findByIdin interfaceUserService- Parameters:
id- The ID of the UserModel object to be retrieved.- Returns:
- An Optional containing the UserModel object if found, otherwise an empty Optional.
- See Also:
-
findUserByEmail
Description copied from interface:UserServiceRetrieve a user by email.- Specified by:
findUserByEmailin interfaceUserService- Parameters:
email- user email- Returns:
- Optional with user
- See Also:
-
save
Description copied from interface:UserServiceSaves a new UserModel object to the database.- Specified by:
savein interfaceUserService- Parameters:
user- The UserModel object to be saved.- Returns:
- The saved UserModel object.
- See Also:
-
deleteById
Description copied from interface:UserServiceDelete user by Id provide.- Specified by:
deleteByIdin interfaceUserService- Parameters:
id-- See Also:
-