java.lang.Object
no.idata1002.group19.domain.entity.User

@Entity public class User extends Object
Represent user entity.
Since:
16.04.2023
Version:
16.04.2023
Author:
Group19
  • Constructor Details

    • User

      public User(String username, String password, String role, Budget budget)
      Default contractor for user.
      Parameters:
      userName - the name of the user.
      pass - the password for the user.
    • User

      public User()
      Empty constructor that is needed for JPA
  • Method Details

    • getId

      public Long getId()
      Returns the user id.
      Returns:
      uid
    • getUsername

      public String getUsername()
      Returns user name
      Returns:
      userName
    • getPassword

      public String getPassword()
      Returns password.
      Returns:
      pass.
    • setId

      public void setId(Long uid)
      Setts the user id
      Parameters:
      uid - the id of the user that you want.
    • setUsername

      public void setUsername(String username)
      Setts the username.
      Parameters:
      userName - the name of the user that you want.
    • setPassword

      public void setPassword(String password)
      Setts the password for the user.
      Parameters:
      pass - the password of the user that you want.
    • getRole

      public String getRole()
      Return role
      Returns:
      role
    • setRole

      public void setRole(String role)
      Setts the role of the user
      Parameters:
      role - the role of the user.
    • getBudget

      public Budget getBudget()
      Return budget
      Returns:
      budget
    • setBudget

      public void setBudget(Budget budget)
      Setts budget
      Parameters:
      budget - budget
    • isValid

      public boolean isValid()
      Checks of the user is valid.
      Returns:
      boolean statement. True if valid, false if not.