Class User
java.lang.Object
no.idata1002.group19.domain.entity.User
Represent user entity.
- Since:
- 16.04.2023
- Version:
- 16.04.2023
- Author:
- Group19
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturn budgetgetId()
Returns the user id.Returns password.getRole()
Return roleReturns user nameboolean
isValid()
Checks of the user is valid.void
Setts budgetvoid
Setts the user idvoid
setPassword
(String password) Setts the password for the user.void
Setts the role of the uservoid
setUsername
(String username) Setts the username.
-
Constructor Details
-
User
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
Returns the user id.- Returns:
- uid
-
getUsername
Returns user name- Returns:
- userName
-
getPassword
Returns password.- Returns:
- pass.
-
setId
Setts the user id- Parameters:
uid
- the id of the user that you want.
-
setUsername
Setts the username.- Parameters:
userName
- the name of the user that you want.
-
setPassword
Setts the password for the user.- Parameters:
pass
- the password of the user that you want.
-
getRole
Return role- Returns:
- role
-
setRole
Setts the role of the user- Parameters:
role
- the role of the user.
-
getBudget
Return budget- Returns:
- budget
-
setBudget
Setts budget- Parameters:
budget
- budget
-
isValid
public boolean isValid()Checks of the user is valid.- Returns:
- boolean statement. True if valid, false if not.
-