java.lang.Object
com.glowmart.shop_management.service.implementation.RoleServiceImpl
All Implemented Interfaces:
RoleService

@Service public class RoleServiceImpl extends Object implements 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 Details

    • RoleServiceImpl

      public RoleServiceImpl()
  • Method Details

    • findRoleByInputRole

      public RoleDto findRoleByInputRole(String role)
      Finds a role by its input string and converts it to a RoleDto.
      Specified by:
      findRoleByInputRole in interface RoleService
      Parameters:
      role - the input role string to search for
      Returns:
      the corresponding RoleDto, or null if no role is found
    • countByInputRole

      public int countByInputRole(String role)
      Counts the number of roles that match the given input string.
      Specified by:
      countByInputRole in interface RoleService
      Parameters:
      role - the input role string to count
      Returns:
      the number of roles matching the input