JpaNotificationDao: JavaDoc added for countUnreadByRecipientId for the reference to the idx_notification_recipient_id_unread

This commit is contained in:
Sergey Matvienko 2023-08-15 00:39:08 +02:00
parent a8f5602036
commit 3f2578b6d0

View File

@ -81,6 +81,9 @@ public class JpaNotificationDao extends JpaAbstractDao<NotificationEntity, Notif
return notificationRepository.updateStatusByIdAndRecipientId(notificationId.getId(), recipientId.getId(), status) != 0;
}
/**
* For this hot method, the partial index `idx_notification_recipient_id_unread` was introduced since 3.5.2
* */
@Override
public int countUnreadByRecipientId(TenantId tenantId, UserId recipientId) {
return notificationRepository.countByRecipientIdAndStatusNot(recipientId.getId(), NotificationStatus.READ);