class FileTypeServiceImpl extends BaseTransactionalService implements FileTypeService {

    @Override
    @Transactional
    public ServiceResult<FileTypeResource> findByName(String name) {

        return find(fileTypeRepository.findByName(name), notFoundError(FileType.class, name))
                .andOnSuccessReturn(fileType -> fileTypeMapper.mapToResource(fileType));
    }

}