@CompileStatic class RepositoryEvent extends ApplicationEvent
Base event class for Repository event firing
Type | Name and description |
---|---|
Map |
args the args passed into whatever method fired this. such as flush, failOnError etc |
BindAction |
bindAction during a binding action, if event trickles down from a bindEvent this will be the name of the BindAction it came from |
Map |
data if this event fired during binding action or a persist that is caused from it then this is the data used |
D |
entity the domain instance this event is for |
String |
eventKey RepositoryEventType.eventKey. set in constructor. ex: a BeforePersistEvent this will be 'beforePersist' |
Constructor and description |
---|
RepositoryEvent
(RepositoryApi repo, D entity, String eventKey) |
RepositoryEvent
(RepositoryApi repo, D entity, String eventKey, Map args) |
RepositoryEvent
(RepositoryApi repo, D entity, String eventKey, Map data, BindAction bindAction, Map args) |
Type Params | Return Type | Name and description |
---|---|---|
|
ResolvableType |
getResolvableType() done per the spring docs so that listeners can bind to the generic of the event. |
|
String |
getRoutingKey() @return the routing key in the form of "DomainClass.eventMethod", for example "City.afterPersist" |
|
void |
setDataFromArgMap(Map args) |
the args passed into whatever method fired this. such as flush, failOnError etc
during a binding action, if event trickles down from a bindEvent this will be the name of the BindAction it came from
if this event fired during binding action or a persist that is caused from it then this is the data used
the domain instance this event is for
RepositoryEventType.eventKey. set in constructor. ex: a BeforePersistEvent this will be 'beforePersist'
done per the spring docs so that listeners can bind to the generic of the event.
ex: implements ApplicationListener
Groovy Documentation