Package com.decs.application.services
Class UserService
java.lang.Object
com.decs.application.services.UserService
User Service Class
This class represents a management service for the system's users.
- Version:
- 1.0
- Author:
- Bruno Guiomar
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcount()voidDelete a user by its identification numberFind and retrieve a User object by its identification numberorg.springframework.data.domain.Page<User> list(org.springframework.data.domain.Pageable pageable) org.springframework.data.domain.Page<User> list(org.springframework.data.domain.Pageable pageable, org.springframework.data.jpa.domain.Specification<User> filter) Add a user to the repository
-
Field Details
-
repository
-
-
Constructor Details
-
UserService
Class Constructor- Parameters:
repository- System's user repository
-
-
Method Details
-
get
Find and retrieve a User object by its identification number- Parameters:
id- User identification number- Returns:
- Respective user object
-
update
Add a user to the repository- Parameters:
entity- User to be added- Returns:
- Added user
-
delete
Delete a user by its identification number- Parameters:
id- User identification number
-
list
public org.springframework.data.domain.Page<User> list(org.springframework.data.domain.Pageable pageable) -
list
-
count
public int count()- Returns:
- Number of users in the user repository
-