Class RoleServiceImpl
java.lang.Object
com.glowmart.shop_management.service.implementation.RoleServiceImpl
- All Implemented Interfaces:
RoleService
Implementation of
RoleService that provides business logic
for managing roles within the application.
This service interacts with the RoleRepository to retrieve
and count roles, and uses RoleConverter to transform entities
into DTOs for external use.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcountByInputRole(String role) Counts the number of roles that match the given input string.findRoleByInputRole(String role) Finds a role by its input string and converts it to aRoleDto.
-
Constructor Details
-
RoleServiceImpl
public RoleServiceImpl()
-
-
Method Details
-
findRoleByInputRole
Finds a role by its input string and converts it to aRoleDto.- Specified by:
findRoleByInputRolein interfaceRoleService- Parameters:
role- the input role string to search for- Returns:
- the corresponding
RoleDto, ornullif no role is found
-
countByInputRole
Counts the number of roles that match the given input string.- Specified by:
countByInputRolein interfaceRoleService- Parameters:
role- the input role string to count- Returns:
- the number of roles matching the input
-