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 theNotificationStateRepositoryFragmentthat does not depend on Trackable information, but rather anotificationStatesembedded collection managed with the entity- Author:
- Jeff Fischer, Phillip Verheyden (phillipuniverse)
-
-
Constructor Summary
Constructors Constructor Description JpaNotificationStateRepositoryFragment()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<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, setNotificationAcknowledged
-
-
-
-
Method Detail
-
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.
-
-