Class PropertyChangeEvent<T>
- java.lang.Object
-
- org.eclipse.persistence.jpa.jpql.tools.model.PropertyChangeEvent<T>
-
- All Implemented Interfaces:
IPropertyChangeEvent<T>
public class PropertyChangeEvent<T> extends java.lang.Object implements IPropertyChangeEvent<T>
The default implementation ofIPropertyChangeEventwhere the generics is the type of the old and new values.- Version:
- 2.4
- Author:
- Pascal Filion
- Since:
- 2.4
-
-
Constructor Summary
Constructors Constructor Description PropertyChangeEvent(StateObject source, java.lang.String propertyName, T oldValue, T newValue)Creates a newPropertyChangeEvent.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TgetNewValue()Returns the new value of the property that changed.TgetOldValue()Returns the old value of the property that changed.java.lang.StringgetPropertyName()Returns the name of the property that changed.<S extends StateObject>
SgetSource()Returns the source where the modification occurred and that fired the event.
-
-
-
Constructor Detail
-
PropertyChangeEvent
public PropertyChangeEvent(StateObject source, java.lang.String propertyName, T oldValue, T newValue)
Creates a newPropertyChangeEvent.- Parameters:
source- The source where the modification occurred and that fired the eventpropertyName- The name of the property associated with the property changeoldValue- The old value of the property that changednewValue- The new value of the property that changed
-
-
Method Detail
-
getNewValue
public T getNewValue()
Returns the new value of the property that changed.- Specified by:
getNewValuein interfaceIPropertyChangeEvent<T>- Returns:
- The property's new value
-
getOldValue
public T getOldValue()
Returns the old value of the property that changed.- Specified by:
getOldValuein interfaceIPropertyChangeEvent<T>- Returns:
- The property's old value
-
getPropertyName
public java.lang.String getPropertyName()
Returns the name of the property that changed.- Specified by:
getPropertyNamein interfaceIPropertyChangeEvent<T>- Returns:
- A unique identifier of the property that changed
-
getSource
public <S extends StateObject> S getSource()
Returns the source where the modification occurred and that fired the event.- Specified by:
getSourcein interfaceIPropertyChangeEvent<T>- Returns:
- The source of the event
-
-