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
-
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 associatedNotificationState
instances.boolean
setNotificationValues
(Object nativeId, String messageType, Class<?> entityType, Map<String, Object> vals) Based on identifying factorsnativeId
,messageType
, andentityType
, set other fields (identified byvals
map key) onNotificationState
to the corresponding value from thevals
map.Methods inherited from class com.broadleafcommerce.data.tracking.jpa.messaging.BaseJpaNotificationStateRepository
findNotificationReadyMembers, getEntityManager, getEntityTypes, getPolyMorphicVariations, setFailedNotificationAttempt, setNotificationAcknowledged
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:NotificationStateValueUpdater
Based on identifying factorsnativeId
,messageType
, andentityType
, set other fields (identified byvals
map key) onNotificationState
to the corresponding value from thevals
map.- Specified by:
setNotificationValues
in 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
NotificationState
instance 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:NotificationStateValueUpdater
Based on identifying factorsentityType
, andnativeId
, retrieve all the associatedNotificationState
instances.- Specified by:
findNotificationMembers
in 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
JpaNotificationState
instances.
-