Class UserServiceImpl

java.lang.Object
com.espacogeek.geek.services.impl.UserServiceImpl
All Implemented Interfaces:
UserService

@Service public class UserServiceImpl extends Object implements UserService
A Implementation class of UserService @see UserService
  • Constructor Details

    • UserServiceImpl

      public UserServiceImpl()
  • Method Details

    • findByIdOrUsernameContainsOrEmail

      public List<UserModel> findByIdOrUsernameContainsOrEmail(Integer id, String username, String email)
      Description copied from interface: UserService
      Retrieves a UserModel object by its id, username (partial match) and Email.
      Specified by:
      findByIdOrUsernameContainsOrEmail in interface UserService
      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:
      • invalid reference
        UserService#findByIdOrUsernameContainsOrEmail(String, String, String)
    • findById

      public Optional<UserModel> findById(Integer id)
      Description copied from interface: UserService
      Retrieves a UserModel object by its ID.
      Specified by:
      findById in interface UserService
      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

      public Optional<UserModel> findUserByEmail(String email)
      Description copied from interface: UserService
      Retrieve a user by email.
      Specified by:
      findUserByEmail in interface UserService
      Parameters:
      email - user email
      Returns:
      Optional with user
      See Also:
    • save

      public UserModel save(UserModel user)
      Description copied from interface: UserService
      Saves a new UserModel object to the database.
      Specified by:
      save in interface UserService
      Parameters:
      user - The UserModel object to be saved.
      Returns:
      The saved UserModel object.
      See Also:
    • deleteById

      public void deleteById(Integer id)
      Description copied from interface: UserService
      Delete user by Id provide.
      Specified by:
      deleteById in interface UserService
      Parameters:
      id -
      See Also:
      • invalid reference
        UserService#delete(Integer)