Interface DataChangeHandler
- All Known Implementing Classes:
AbstractDataChangeHandler,PersistenceUpdateDataChangeHandler,RowDeleteDataChangeHandler,RowInsertDataChangeHandler,TemporaryUpdateDataChangeHandler,UpdateDataChangeHandler
public interface DataChangeHandler
Interface that specifies a handler that creates and tracks data changes.
- Since:
- 1.6
-
Method Summary
Modifier and TypeMethodDescriptionvoidClear the locally stored changes.voidDisable tracking of data changes to avoid tracking of changes that are caused by save or discard operations.voidEnable tracking of data changes to keep track of all changes.voidTrigger handling ofIStructuralChangeEvents to update locally stored changes, e.g.booleanisCellDirty(int columnPosition, int rowPosition) Checks if the cell at the given position is dirty.booleanisColumnDirty(int columnPosition) Checks if the column with the given position contains cells in a dirty state.booleanisDirty()Checks if there is a dirty state tracked by this handler.booleanisRowDirty(int rowPosition) Checks if the row with the given position contains cells in a dirty state.
-
Method Details
-
disableTracking
void disableTracking()Disable tracking of data changes to avoid tracking of changes that are caused by save or discard operations. -
enableTracking
void enableTracking()Enable tracking of data changes to keep track of all changes. -
handleStructuralChange
Trigger handling ofIStructuralChangeEvents to update locally stored changes, e.g. update the row index of a key in case a row above was inserted or deleted.- Parameters:
event- The event to handle.
-
clearDataChanges
void clearDataChanges()Clear the locally stored changes. -
isColumnDirty
boolean isColumnDirty(int columnPosition) Checks if the column with the given position contains cells in a dirty state.- Parameters:
columnPosition- The position of the column whose dirty state should be checked.- Returns:
trueif the column contains cells that are marked as dirty (data has changed and not saved yet),falseif not.
-
isRowDirty
boolean isRowDirty(int rowPosition) Checks if the row with the given position contains cells in a dirty state.- Parameters:
rowPosition- The position of the row whose dirty state should be checked.- Returns:
trueif the row contains cells that are marked as dirty (data has changed and not saved yet),falseif not.
-
isCellDirty
boolean isCellDirty(int columnPosition, int rowPosition) Checks if the cell at the given position is dirty.- Parameters:
columnPosition- The column position of the cell whose dirty state should be checked.rowPosition- The row position of the cell whose dirty state should be checked.- Returns:
trueif the cell is dirty (data has changed and not saved yet),falseif not.
-
isDirty
boolean isDirty()Checks if there is a dirty state tracked by this handler.- Returns:
trueif there is a dirty state (data has changed and not saved yet),falseif not.- Since:
- 2.4
-