Class JpaNotificationStateRepositoryFragment
java.lang.Object
com.broadleafcommerce.data.tracking.jpa.messaging.BaseJpaNotificationStateRepository
com.broadleafcommerce.data.tracking.jpa.messaging.JpaNotificationStateRepositoryFragment
- All Implemented Interfaces:
com.broadleafcommerce.common.messaging.notification.NotificationStateRepository,com.broadleafcommerce.common.messaging.notification.NotificationStateRepositoryFragment,NotificationStateValueUpdater
public class JpaNotificationStateRepositoryFragment
extends BaseJpaNotificationStateRepository
implements NotificationStateValueUpdater
An implementation of the
NotificationStateRepositoryFragment that does not depend on
Trackable information, but rather a notificationStates embedded collection managed with
the entity- Author:
- Jeff Fischer, Phillip Verheyden (phillipuniverse)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<com.broadleafcommerce.common.messaging.notification.domain.NotificationState>findNotificationMembers(Class<?> entityType, String id) Based on identifying factorsentityType, andnativeId, retrieve all the associatedNotificationStateinstances.booleansetNotificationValues(Object nativeId, String messageType, Class<?> entityType, Map<String, Object> vals) Based on identifying factorsnativeId,messageType, andentityType, set other fields (identified byvalsmap key) onNotificationStateto the corresponding value from thevalsmap.Methods inherited from class com.broadleafcommerce.data.tracking.jpa.messaging.BaseJpaNotificationStateRepository
findNotificationReadyMembers, getEntityManager, getEntityTypes, getPolyMorphicVariations, setFailedNotificationAttempt, setNotificationAcknowledgedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.broadleafcommerce.common.messaging.notification.NotificationStateRepository
findNotificationReadyMembers, setFailedNotificationAttempt, setNotificationAcknowledged
-
Constructor Details
-
JpaNotificationStateRepositoryFragment
public JpaNotificationStateRepositoryFragment()
-
-
Method Details
-
setNotificationValues
@Transactional public boolean setNotificationValues(@NonNull Object nativeId, @NonNull String messageType, @NonNull Class<?> entityType, @NonNull Map<String, Object> vals) Description copied from interface:NotificationStateValueUpdaterBased on identifying factorsnativeId,messageType, andentityType, set other fields (identified byvalsmap key) onNotificationStateto the corresponding value from thevalsmap.- Specified by:
setNotificationValuesin interfaceNotificationStateValueUpdater- Parameters:
nativeId- The primary key value of the related container entity. SeeJpaNotificationState.getContainer().messageType- The message type for this notification state. SeeNotificationState.getMessageType().entityType- The entity type of the related container entity. SeeJpaNotificationState.getEntityType().vals- The field name and update value pairs to apply to the identifiedNotificationState.- Returns:
- Whether or not a
NotificationStateinstance was actually updated as a result of this call.
-
findNotificationMembers
@NonNull public List<com.broadleafcommerce.common.messaging.notification.domain.NotificationState> findNotificationMembers(@NonNull Class<?> entityType, @NonNull String id) Description copied from interface:NotificationStateValueUpdaterBased on identifying factorsentityType, andnativeId, retrieve all the associatedNotificationStateinstances.- Specified by:
findNotificationMembersin interfaceNotificationStateValueUpdater- Parameters:
entityType- The entity type of the related container entity. SeeJpaNotificationState.getEntityType().id- The primary key value of the related container entity. SeeJpaNotificationState.getContainer().- Returns:
- The list of related
JpaNotificationStateinstances.
-