Class UpdateDataChange
- java.lang.Object
-
- org.eclipse.nebula.widgets.nattable.datachange.UpdateDataChange
-
- All Implemented Interfaces:
DataChange
- Direct Known Subclasses:
PersistenceUpdateDataChange
,TemporaryUpdateDataChange
public abstract class UpdateDataChange extends Object implements DataChange
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 UpdateDataChange(Object key, Object value, CellKeyHandler<?> keyHandler)
Create anUpdateDataChange
that is able to revert the performed data update.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getKey()
protected UpdateDataCommand
getUpdateDataCommand(DataChangeLayer layer)
Object
getValue()
void
updateKey(Object key)
Update the locally stored key.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.nebula.widgets.nattable.datachange.DataChange
discard, save
-
-
-
-
Constructor Detail
-
UpdateDataChange
public UpdateDataChange(Object key, Object value, CellKeyHandler<?> keyHandler)
Create anUpdateDataChange
that is able to revert the performed data update.- Parameters:
key
- The key under which the cell can be found that should be updated.value
- The value that should be set on save or discard.keyHandler
- TheCellKeyHandler
used to get indexes out of the key.
-
-
Method Detail
-
getKey
public Object getKey()
- Specified by:
getKey
in interfaceDataChange
- Returns:
- The key used to identify the change in the backing data.
-
updateKey
public void updateKey(Object key)
Description copied from interface:DataChange
Update the locally stored key. Used in case the key changed because of structural changes.- Specified by:
updateKey
in interfaceDataChange
- Parameters:
key
- The updated key.
-
getValue
public Object getValue()
- Returns:
- The value that should be set on save or discard.
-
getUpdateDataCommand
protected UpdateDataCommand getUpdateDataCommand(DataChangeLayer layer)
-
-