package com.pollex.pam.service; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.pollex.pam.domain.PersonalNotification; import com.pollex.pam.enums.PersonalNotificationRoleEnum; import com.pollex.pam.repository.PersonalNotificationRepository; @Service @Transactional public class PersonalNotificationService { @Autowired PersonalNotificationRepository personalNotificationRepository; public List getMyPersonalNotification(Long ownerId, PersonalNotificationRoleEnum role) { return personalNotificationRepository.findAllByOwnerRoleAndOwnerId(role, ownerId); } }