Interface Change
-
- All Known Implementing Classes:
ChangeImpl
public interface Change
This represents a single change made to aBeanDatabase
- Author:
- jwells
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Change.ChangeCategory
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Change.ChangeCategory
getChangeCategory()
Gets the category of change this Change object representsType
getChangeType()
Gets the type of the change for all change categories.String
getInstanceKey()
Returns the key of the instance that was removed, added or modified for the categories ADD_INSTANCE, REMOVE_INSTANCE and MODIFY_INSTANCEInstance
getInstanceValue()
Returns the value of the instance that was removed, added or modified for the categories ADD_INSTANCE, REMOVE_INSTANCE and MODIFY_INSTANCE.List<PropertyChangeEvent>
getModifiedProperties()
Returns a list of properties that were changed if the change category is MODIFY_INSTANCE.Instance
getOriginalInstanceValue()
Returns the original Instance for the category MODIFY_INSTANCE
-
-
-
Method Detail
-
getChangeCategory
Change.ChangeCategory getChangeCategory()
Gets the category of change this Change object represents- Returns:
- REMOVE_TYPE
- ADD_TYPE
- ADD_INSTANCE
- REMOVE_INSTANCE
- MODIFY_INSTANCE
-
getChangeType
Type getChangeType()
Gets the type of the change for all change categories. In the case of ADD_TYPE the value returned will include all instances added, but there will also be an ADD_INSTANCE change sent for each instance of this type that was added. In the case of REMOVE_TYPE the value return will include all instances still in the type at the time of removal, but there will also be a REMOVE_INSTANCE change sent for each instance that was in the type at the time of type removal- Returns:
- The type of the change. Will not be null
-
getInstanceKey
String getInstanceKey()
Returns the key of the instance that was removed, added or modified for the categories ADD_INSTANCE, REMOVE_INSTANCE and MODIFY_INSTANCE- Returns:
- The key of the instance that was added, removed or modified. Returns null for change category REMOVE_TYPE or ADD_TYPE
-
getInstanceValue
Instance getInstanceValue()
Returns the value of the instance that was removed, added or modified for the categories ADD_INSTANCE, REMOVE_INSTANCE and MODIFY_INSTANCE. In the MODIFY_INSTANCE case this will return the new Instance value- Returns:
- The value of the instance that was added, removed or modified. Returns null for change category REMOVE_TYPE or ADD_TYPE
-
getOriginalInstanceValue
Instance getOriginalInstanceValue()
Returns the original Instance for the category MODIFY_INSTANCE- Returns:
- The original Instance for this key if the category is MODIFY_INSTANCE. Returns null for all other category of change
-
getModifiedProperties
List<PropertyChangeEvent> getModifiedProperties()
Returns a list of properties that were changed if the change category is MODIFY_INSTANCE.- Returns:
- A non-null and non-empty list of modified properties that were changed in the instance for change category MODIFY_INSTANCE. Returns null for all other change categories
-
-