Interface to classes that are able to track changes to their internal state.
Type Params | Return Type | Name and description |
---|---|---|
|
java.lang.Object |
getOriginalValue(java.lang.String propertyName) Returns the original value of the property prior to when trackChanges() was called |
|
boolean |
hasChanged() @return True if the instance has any changes |
|
boolean |
hasChanged(java.lang.String propertyName) @param propertyName The name of the property |
|
java.util.List<java.lang.String> |
listDirtyPropertyNames() @return A list of the dirty property names |
|
void |
markDirty() Marks the whole class and all its properties as dirty. |
|
void |
markDirty(java.lang.String propertyName) Marks the given property name as dirty |
|
void |
markDirty(java.lang.String propertyName, java.lang.Object newValue) Marks the given property name as dirty |
|
void |
markDirty(java.lang.String propertyName, java.lang.Object newValue, java.lang.Object oldValue) Marks the given property name as dirty |
|
void |
syncChangedProperties(java.lang.Object o) Sync the changes for a given instance with this instance. |
|
void |
trackChanges() Indicates that the instance should start tacking changes. |
|
void |
trackChanges(java.util.Map<java.lang.String, java.lang.Object> changedProperties) Initialises the changes with the given changes. |
Returns the original value of the property prior to when trackChanges() was called
propertyName
- The property name
propertyName
- The name of the property
Marks the whole class and all its properties as dirty. When called any future call to any of the hasChanged methods will return true.
Marks the given property name as dirty
propertyName
- The property nameMarks the given property name as dirty
propertyName
- The property namenewValue
- The new valueMarks the given property name as dirty
propertyName
- The property namenewValue
- The new valueSync the changes for a given instance with this instance.
o
- a given objectIndicates that the instance should start tacking changes. Note that if the instance is dirty this will clear any previously tracked changes
Initialises the changes with the given changes.
changedProperties
- The changes.