public interface BeanPersistListener
These listen events occur after a successful commit. They also occur in a background thread rather than the thread used to perform the actual insert update or delete. In this way there is a delay between the commit and when the listener is notified of the event.
It is worth noting that BeanPersistListener is different in two main ways from BeanPersistController postXXX methods.
A BeanPersistListener is either found automatically via class path search or
can be added programmatically via ServerConfig.add(BeanPersistListener)
}.
ServerConfig.add(BeanPersistListener)
Modifier and Type | Method and Description |
---|---|
void |
deleted(Object bean)
Notified that a bean has been deleted.
|
void |
inserted(Object bean)
Notified that a bean has been inserted.
|
boolean |
isRegisterFor(Class<?> cls)
Return true if this BeanPersistListener should be registered for events
on this entity type.
|
void |
softDeleted(Object bean)
Notified that a bean has been soft deleted.
|
void |
updated(Object bean,
Set<String> updatedProperties)
Notified that a bean has been updated.
|
boolean isRegisterFor(Class<?> cls)
void inserted(Object bean)
bean
- The bean that was inserted.void updated(Object bean, Set<String> updatedProperties)
bean
- The bean that was updated.updatedProperties
- The properties that were modified by this update.void deleted(Object bean)
bean
- The bean that was deleted.void softDeleted(Object bean)
bean
- The bean that was soft deleted.Copyright © 2019. All rights reserved.