Class RowInsertDataChange

  • All Implemented Interfaces:
    DataChange

    public class RowInsertDataChange
    extends Object
    implements DataChange
    DataChange implementation to track row insert operations. Is used in persistent mode and can only discard a row insert operation by deleting it again via RowDeleteCommand.
    Since:
    1.6
    • Constructor Detail

      • RowInsertDataChange

        public RowInsertDataChange​(Object key,
                                   CellKeyHandler<?> keyHandler)
        Create a RowInsertDataChange that is able to revert the performed row insert operation.
        Parameters:
        key - The key under which the row can be found that should be deleted again.
        keyHandler - The CellKeyHandler used to get the row index out of the key.
    • Method Detail

      • discard

        public void discard​(DataChangeLayer layer)
        Description copied from interface: DataChange
        Discard the change.
        Specified by:
        discard in interface DataChange
        Parameters:
        layer - The DataChangeLayer 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.
        Specified by:
        save in interface DataChange
        Parameters:
        layer - The DataChangeLayer used to perform index-position transformations and to trigger the necessary commands to save.
      • 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.