Class EntityContext
java.lang.Object
com.broadleafcommerce.data.tracking.core.EntityContext
ThreadLocal context for passing a containing entity during
Trackable.getNotificationStates()
retrieval. Retrieving the notification states relies on
the presence of a back reference to the containing entity for the Trackable
embeddable
instance. This reference is not always available - especially immediately after an entity is
merged. We can backstop those missing cases by supplying an optional context instance of the back
reference in order to more reliably fetch the relevant notification states. Refer to
JpaNotificationStateUtility#get(..)
as an example of consumption.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
static void
clear()
boolean
static EntityContext
com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware
int
hashCode()
void
setEntity
(com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware entity) toString()
-
Constructor Details
-
EntityContext
public EntityContext()
-
-
Method Details
-
getContext
-
clear
public static void clear() -
getEntity
public com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware getEntity() -
setEntity
public void setEntity(com.broadleafcommerce.common.messaging.notification.domain.NotificationStateAware entity) -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-