Class RoleMapperImpl

java.lang.Object
com.alpaca.mapper.impl.RoleMapperImpl
All Implemented Interfaces:
GenericMapper<Role,RoleResponseDTO,RoleRequestDTO>, IRoleMapper

@Component public class RoleMapperImpl extends Object implements IRoleMapper
Implementation of the IRoleMapper interface responsible for mapping between Role entities and their corresponding request and response DTOs.

This mapper uses:

Key responsibilities:

  • Convert Role entities into RoleResponseDTO objects.
  • Convert RoleRequestDTO objects into Role entities.
  • Transform collections of roles into lists of response DTOs.
  • Handle null and empty inputs gracefully by returning safe defaults.

This class is annotated with Component to enable Spring's dependency injection and uses Lombok's RequiredArgsConstructor for constructor-based injection (if required in future).

See Also: