public SearchResultsBean<NotificationDto<?>> searchNotificationsByRecipient(@NotNull String recipientId, SearchCriteriaBean searchCriteriaBeanIn) {
        var searchCriteria = new SearchCriteriaBean(searchCriteriaBeanIn);
        if (searchCriteriaBeanIn.getOrderBy() == null) {
            searchCriteria.setOrder("id", false);
        }
        SearchResultsBean<NotificationEntity> results = tryAction(
             () -> notificationRepository.searchNotificationsByUser(recipientId, searchCriteria)
        );

        List<NotificationDto<?>> dtos = results.getBeans().stream()
                                               .map(notificationMapper::entityToDto)
                                               .collect(Collectors.toList());

        return new SearchResultsBean<>(dtos, results.getTotalSize());
    }
Search for any notification for a given user/recipient.

@param recipientId the user's ID
@param searchCriteriaBeanIn the search criteria
manager/api/rest-impl/src/main/java/io/apiman/manager/api/service/NotificationService.java