Skip to content

Commit

Permalink
chore[user]: Add JavaDoc to UserRepository
Browse files Browse the repository at this point in the history
  • Loading branch information
Fredrik Marjoni committed Apr 23, 2026
1 parent 6547b5b commit 2330f3a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/main/java/edu/group5/app/model/user/UserRepository.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@

import edu.group5.app.model.DBRepository;
import edu.group5.app.utils.ParameterValidator;

/**
* Repository class for managing User entities. It provides methods to retrieve users,
* find users by their unique identifier or email address, and initializes the repository with input data.
* The repository uses a HashMap to store User objects for efficient retrieval based on their unique identifier.
*/
public class UserRepository extends DBRepository<Integer, User> {
public final static String ROLE_CUSTOMER = "Customer";

Expand Down Expand Up @@ -69,6 +73,11 @@ public List<Object[]> export() {

}

/**
* Retrieves a copy of the current users in the repository.
* @return a HashMap containing the current users,
* where the key is the user ID and the value is the User object
*/
public HashMap<Integer, User> getUsers() {
return new HashMap<>(content);
}
Expand Down

0 comments on commit 2330f3a

Please sign in to comment.