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 an UpdateDataCommand that is created as result of a DataUpdateEvent and can be used to revert the data update.
Since:
1.6
  • Constructor Details

    • UpdateDataChange

      public UpdateDataChange(Object key, Object value, CellKeyHandler<?> keyHandler)
      Create an UpdateDataChange 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 - The CellKeyHandler used to get indexes out of the key.
  • Method Details

    • getKey

      public Object getKey()
      Specified by:
      getKey in interface DataChange
      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 interface DataChange
      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)