Class UserService

java.lang.Object
com.esprit.services.users.UserService
All Implemented Interfaces:
IService<User>

public class UserService extends Object implements IService<User>
  • Field Details

  • Constructor Details

    • UserService

      public UserService()
      Performs UserService operation.
  • Method Details

    • getUserById

      public User getUserById(Long id)
      Parameters:
      id -
      Returns:
      User
    • getUserByEmail

      private User getUserByEmail(String email)
      Parameters:
      email -
      Returns:
      User
    • create

      public void create(User user)
      Specified by:
      create in interface IService<User>
    • read

      public List<User> read()
      Specified by:
      read in interface IService<User>
    • update

      public void update(User user)
      Specified by:
      update in interface IService<User>
    • delete

      public void delete(User user)
      Specified by:
      delete in interface IService<User>
    • sendMail

      public void sendMail(String Recipient, String messageToSend)
      Performs sendMail operation.
    • generateUserPDF

      public void generateUserPDF()
      Performs generateUserPDF operation.
    • sort

      public List<User> sort(String Option)
      Performs sort operation.
      Returns:
      the result of the operation
    • getUsers

      private List<User> getUsers(List<User> userList, PreparedStatement statement) throws SQLException
      Throws:
      SQLException
    • checkEmailFound

      public boolean checkEmailFound(String email)
      Performs checkEmailFound operation.
      Returns:
      the result of the operation
    • updatePassword

      public void updatePassword(String email, String NewPassword)
      Performs updatePassword operation.
    • forgetPassword

      public void forgetPassword(String email, String Password)
      Performs forgetPassword operation.
    • getUserRow

      private User getUserRow(PreparedStatement preparedStatement) throws SQLException
      Throws:
      SQLException
    • login

      public User login(String email, String password)
      Performs login operation.
      Returns:
      the result of the operation