PropertyDomainEvent

Fired whenever the framework interacts with a domain object’s property.

This is the specialization of AbstractDomainEvent , for properties, * which should then be further subclassed by domain application.

The class has a number of responsibilities (in addition to those it inherits):

  • capture the old and new values of the property

The class itself is instantiated automatically by the framework using a no-arg constructor; fields are set reflectively.

API

PropertyDomainEvent.java
class PropertyDomainEvent<S, T> {
  PropertyDomainEvent()     (1)
  PropertyDomainEvent(S source)     (2)
  String toString()
}
1 PropertyDomainEvent()

Subtypes can define a no-arg constructor; the framework sets state via (non-API) setters.

2 PropertyDomainEvent(S)

Subtypes can define a one-arg constructor; the framework sets state via (non-API) setters.

Members

PropertyDomainEvent()

Subtypes can define a no-arg constructor; the framework sets state via (non-API) setters.

PropertyDomainEvent(S)

Subtypes can define a one-arg constructor; the framework sets state via (non-API) setters.

A one-arg constructor is particularly useful in the context of non-static DomainEvent class nesting.