Class BaseJpaNotificationStateRepository
- java.lang.Object
-
- com.broadleafcommerce.data.tracking.jpa.messaging.BaseJpaNotificationStateRepository
-
- Direct Known Subclasses:
JpaNotificationStateRepositoryFragment
,JpaTrackableNotificationStateRepository
public class BaseJpaNotificationStateRepository extends Object
-
-
Constructor Summary
Constructors Constructor Description BaseJpaNotificationStateRepository()
BaseJpaNotificationStateRepository(javax.persistence.EntityManager em)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stream<com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware>
findNotificationReadyMembers(Object lastProcessedNativeId, int pageSize, String messageType, Duration faultThreshold, Class<?> entityType)
javax.persistence.EntityManager
getEntityManager()
protected List<String>
getEntityTypes(@NonNull Class<?> entityType)
Gather list relevant class names, including the provided class & its super classprotected List<String>
getPolyMorphicVariations(Class<?> entityType)
boolean
setFailedNotificationAttempt(Object nativeId, String messageType, int attemptCount, Instant nextAttempt, Class<?> entityType, boolean stopped)
boolean
setNotificationAcknowledged(Object nativeId, String messageType, int attemptCount, Class<?> entityType)
-
-
-
Method Detail
-
setNotificationAcknowledged
@Transactional(propagation=REQUIRES_NEW) public boolean setNotificationAcknowledged(@NonNull Object nativeId, @NonNull String messageType, int attemptCount, @NonNull Class<?> entityType)
-
setFailedNotificationAttempt
@Transactional(propagation=REQUIRES_NEW) public boolean setFailedNotificationAttempt(@NonNull Object nativeId, @NonNull String messageType, int attemptCount, @NonNull Instant nextAttempt, @NonNull Class<?> entityType, boolean stopped)
-
getEntityTypes
protected List<String> getEntityTypes(@NonNull @NonNull Class<?> entityType)
Gather list relevant class names, including the provided class & its super class- Parameters:
entityType
- the starting class whose name & super class's name should be gathered- Returns:
- the list relevant class names
-
findNotificationReadyMembers
@NonNull public Stream<com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware> findNotificationReadyMembers(@Nullable Object lastProcessedNativeId, int pageSize, @NonNull String messageType, @NonNull Duration faultThreshold, @NonNull Class<?> entityType)
-
getEntityManager
public javax.persistence.EntityManager getEntityManager()
-
-