Kereta Yarsi Indonesia
Loading...
Searching...
No Matches
model.User Class Reference
Inheritance diagram for model.User:
model.Admin

Public Member Functions

 User ()
 
 User (int userID, String username, String password, byte[] salt, String role)
 
 User (int userID, String username, String password, byte[] salt)
 
int getUserID ()
 
void setUserID (int userID)
 
String getUsername ()
 
void setUsername (String username)
 
String getPassword ()
 
void setPassword (String password)
 
byte[] getSalt ()
 
void setSalt (byte[] salt)
 
String getRole ()
 
void setRole (String role)
 

Detailed Description

Represents a user in the system.

This class encapsulates the details of a user, including their ID, username, password, salt used for password hashing, and role within the system.

Version
1.0
Since
2024-06-23
See also
model.UserDAO
controller.UserController
Author
Muhammad Rizal Anditama Nugraha

Constructor & Destructor Documentation

◆ User() [1/3]

model.User.User ( )
inline

Default constructor for creating an empty user object.

◆ User() [2/3]

model.User.User ( int  userID,
String  username,
String  password,
byte[]  salt,
String  role 
)
inline

Constructs a new User with the specified details.

Parameters
userIDthe user ID
usernamethe username
passwordthe password
saltthe salt used for password hashing
rolethe role of the user

◆ User() [3/3]

model.User.User ( int  userID,
String  username,
String  password,
byte[]  salt 
)
inline

Constructs a new User with the specified details and a default role of "member".

Parameters
userIDthe user ID
usernamethe username
passwordthe password
saltthe salt used for password hashing

Member Function Documentation

◆ getPassword()

String model.User.getPassword ( )
inline

Gets the password.

Returns
the password

◆ getRole()

String model.User.getRole ( )
inline

Gets the role of the user.

Returns
the role

◆ getSalt()

byte[] model.User.getSalt ( )
inline

Gets the salt used for password hashing.

Returns
the salt

◆ getUserID()

int model.User.getUserID ( )
inline

Gets the user ID.

Returns
the user ID

◆ getUsername()

String model.User.getUsername ( )
inline

Gets the username.

Returns
the username

◆ setPassword()

void model.User.setPassword ( String  password)
inline

Sets the password.

Parameters
passwordthe password to set

◆ setRole()

void model.User.setRole ( String  role)
inline

Sets the role of the user.

Parameters
rolethe role to set

◆ setSalt()

void model.User.setSalt ( byte[]  salt)
inline

Sets the salt used for password hashing.

Parameters
saltthe salt to set

◆ setUserID()

void model.User.setUserID ( int  userID)
inline

Sets the user ID.

Parameters
userIDthe user ID to set

◆ setUsername()

void model.User.setUsername ( String  username)
inline

Sets the username.

Parameters
usernamethe username to set

The documentation for this class was generated from the following file: