public void propertyChange ( final PropertyChangeEvent event ) { if ( objectStateMap . containsKey ( event . getPropertyName ( ) ) ) { if ( objectStateMap . get ( event . getPropertyName ( ) ) == ObjectUtils . hashCode ( event . getNewValue ( ) ) ) { // NOTE the state of the property identified by the event has been reverted to it's original, persisted value. objectStateMap . remove ( event . getPropertyName ( ) ) ; } } else { if ( ! ObjectUtils . equalsIgnoreNull ( event . getOldValue ( ) , event . getNewValue ( ) ) ) { objectStateMap . put ( event . getPropertyName ( ) , ObjectUtils . hashCode ( event . getOldValue ( ) ) ) ; } } }
The event handler method that gets fired when a property of the Bean tracked by this ChangeTracker has been modified . The PropertyChangeEvent encapsulates all the information pertaining to the property change including the name of the property it s old and new value and the source Bean of the targeted change .