Class PersistenceUpdateDataChange
- java.lang.Object
-
- org.eclipse.nebula.widgets.nattable.datachange.UpdateDataChange
-
- org.eclipse.nebula.widgets.nattable.datachange.PersistenceUpdateDataChange
-
- All Implemented Interfaces:
DataChange
public class PersistenceUpdateDataChange extends UpdateDataChange
DataChange
implementation that tracks data updates. Contains anUpdateDataCommand
that is created as result of a DataUpdateEvent and can be used to revert the data update.- Since:
- 1.6
-
-
Constructor Summary
Constructors Constructor Description PersistenceUpdateDataChange(Object key, Object oldValue, CellKeyHandler<?> keyHandler)
Create anPersistenceUpdateDataChange
that is able to revert the performed data update.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
discard(DataChangeLayer layer)
Discard the change.void
save(DataChangeLayer layer)
Save the change.-
Methods inherited from class org.eclipse.nebula.widgets.nattable.datachange.UpdateDataChange
getKey, getUpdateDataCommand, getValue, updateKey
-
-
-
-
Constructor Detail
-
PersistenceUpdateDataChange
public PersistenceUpdateDataChange(Object key, Object oldValue, CellKeyHandler<?> keyHandler)
Create anPersistenceUpdateDataChange
that is able to revert the performed data update.- Parameters:
key
- The key under which the cell can be found that should be updated.oldValue
- The old value that should be re-applied on discard.keyHandler
- TheCellKeyHandler
used to get indexes out of the key.
-
-
Method Detail
-
discard
public void discard(DataChangeLayer layer)
Description copied from interface:DataChange
Discard the change.- Parameters:
layer
- TheDataChangeLayer
used to perform index-position transformations and to trigger the necessary commands to save.
-
save
public void save(DataChangeLayer layer)
Description copied from interface:DataChange
Save the change.- Parameters:
layer
- TheDataChangeLayer
used to perform index-position transformations and to trigger the necessary commands to save.
-
-