Class OperationAwarePersistenceMessage<T>
java.lang.Object
com.broadleafcommerce.common.messaging.PersistenceMessage<T>
com.broadleafcommerce.adminuser.user.messaging.OperationAwarePersistenceMessage<T>
- Type Parameters:
T
- the type of the entity on which a persistence event occurred
public class OperationAwarePersistenceMessage<T>
extends com.broadleafcommerce.common.messaging.PersistenceMessage<T>
An extension of
PersistenceMessage
that includes an operation type field and timestamp
field describing the change on the entity.- Author:
- Samarth Dhruva (samarthd)
-
Constructor Summary
ConstructorsConstructorDescriptionOperationAwarePersistenceMessage
(T entity, @NonNull com.broadleafcommerce.data.tracking.core.type.OperationType operationType, @NonNull Instant timestamp) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
com.broadleafcommerce.data.tracking.core.type.OperationType
The type of persistence event that happened on thePersistenceMessage.getEntity()
.The timestamp of the persistence event that happened on thePersistenceMessage.getEntity()
.int
hashCode()
static <T> OperationAwarePersistenceMessage<T>
of
(T entity, @NonNull com.broadleafcommerce.data.tracking.core.type.OperationType operationType, @NonNull Instant timestamp) toString()
Methods inherited from class com.broadleafcommerce.common.messaging.PersistenceMessage
get_baseClass, get_class, getEntity, of
-
Constructor Details
-
OperationAwarePersistenceMessage
-
-
Method Details
-
of
public static <T> OperationAwarePersistenceMessage<T> of(@NonNull T entity, @NonNull @NonNull com.broadleafcommerce.data.tracking.core.type.OperationType operationType, @NonNull @NonNull Instant timestamp) -
getOperationType
public com.broadleafcommerce.data.tracking.core.type.OperationType getOperationType()The type of persistence event that happened on thePersistenceMessage.getEntity()
. -
getTimestamp
The timestamp of the persistence event that happened on thePersistenceMessage.getEntity()
. Useful for consumers to know ordering of events. -
toString
- Overrides:
toString
in classcom.broadleafcommerce.common.messaging.PersistenceMessage<T>
-
equals
- Overrides:
equals
in classcom.broadleafcommerce.common.messaging.PersistenceMessage<T>
-
canEqual
- Overrides:
canEqual
in classcom.broadleafcommerce.common.messaging.PersistenceMessage<T>
-
hashCode
public int hashCode()- Overrides:
hashCode
in classcom.broadleafcommerce.common.messaging.PersistenceMessage<T>
-