Kereta Yarsi Indonesia
Loading...
Searching...
No Matches
model.UserDAO Interface Reference
Inheritance diagram for model.UserDAO:
controller.UserController

Public Member Functions

boolean createUser (User user)
 
User getUser (int userID)
 
User getUserByUsername (String username)
 
boolean updateUser (User user)
 
boolean deleteUser (int userID)
 
boolean register (User user)
 
boolean login (String username, String password)
 

Detailed Description

Interface for User Data Access Object (DAO).

This interface defines methods to access and manipulate user data in the database.

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

Member Function Documentation

◆ createUser()

boolean model.UserDAO.createUser ( User  user)

Creates a new user in the database.

Parameters
userthe user object to be created
Returns
true if the user is successfully created, false otherwise

Implemented in controller.UserController.

◆ deleteUser()

boolean model.UserDAO.deleteUser ( int  userID)

Deletes a user from the database based on the user ID.

Parameters
userIDthe ID of the user to delete
Returns
true if the user is successfully deleted, false otherwise

Implemented in controller.UserController.

◆ getUser()

User model.UserDAO.getUser ( int  userID)

Retrieves a user from the database based on the user ID.

Parameters
userIDthe ID of the user to retrieve
Returns
the User object if found, null otherwise

Implemented in controller.UserController.

◆ getUserByUsername()

User model.UserDAO.getUserByUsername ( String  username)

Retrieves a user from the database based on the username.

Parameters
usernamethe username of the user to retrieve
Returns
the User object if found, null otherwise

Implemented in controller.UserController.

◆ login()

boolean model.UserDAO.login ( String  username,
String  password 
)

Authenticates a user based on the username and password.

Parameters
usernamethe username of the user
passwordthe password of the user
Returns
true if the login is successful, false otherwise

Implemented in controller.UserController.

◆ register()

boolean model.UserDAO.register ( User  user)

Registers a new user in the system.

Parameters
userthe user object to be registered
Returns
true if the user is successfully registered, false otherwise

Implemented in controller.UserController.

◆ updateUser()

boolean model.UserDAO.updateUser ( User  user)

Updates an existing user in the database.

Parameters
userthe user object to be updated
Returns
true if the user is successfully updated, false otherwise

Implemented in controller.UserController.


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