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 booleanbooleancom.broadleafcommerce.data.tracking.core.type.OperationTypeThe type of persistence event that happened on thePersistenceMessage.getEntity().The timestamp of the persistence event that happened on thePersistenceMessage.getEntity().inthashCode()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:
toStringin classcom.broadleafcommerce.common.messaging.PersistenceMessage<T>
-
equals
- Overrides:
equalsin classcom.broadleafcommerce.common.messaging.PersistenceMessage<T>
-
canEqual
- Overrides:
canEqualin classcom.broadleafcommerce.common.messaging.PersistenceMessage<T>
-
hashCode
public int hashCode()- Overrides:
hashCodein classcom.broadleafcommerce.common.messaging.PersistenceMessage<T>
-