= PropertyDomainEvent
:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at. http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR  CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

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

This is the specialization of xref:refguide:applib:index/events/domain/AbstractDomainEvent.adoc[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

[source,java]
.PropertyDomainEvent.java
----
class PropertyDomainEvent<S, T> {
  PropertyDomainEvent()     // <.>
  PropertyDomainEvent(S source)     // <.>
  String toString()
}
----

<.> xref:#PropertyDomainEvent_[PropertyDomainEvent()]
+
--
Subtypes can define a no-arg constructor; the framework sets state via (non-API) setters.
--
<.> xref:#PropertyDomainEvent_S[PropertyDomainEvent(S)]
+
--
Subtypes can define a one-arg constructor; the framework sets state via (non-API) setters.
--

== Members

[#PropertyDomainEvent_]
=== PropertyDomainEvent()

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

[#PropertyDomainEvent_S]
=== 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.
