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 TypeMethodDescriptionvoid
Clear the locally stored changes.void
Disable tracking of data changes to avoid tracking of changes that are caused by save or discard operations.void
Enable tracking of data changes to keep track of all changes.void
Trigger handling ofIStructuralChangeEvent
s to update locally stored changes, e.g.boolean
isCellDirty
(int columnPosition, int rowPosition) Checks if the cell at the given position is dirty.boolean
isColumnDirty
(int columnPosition) Checks if the column with the given position contains cells in a dirty state.boolean
isDirty()
Checks if there is a dirty state tracked by this handler.boolean
isRowDirty
(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 ofIStructuralChangeEvent
s 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:
true
if the column contains cells that are marked as dirty (data has changed and not saved yet),false
if 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:
true
if the row contains cells that are marked as dirty (data has changed and not saved yet),false
if 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:
true
if the cell is dirty (data has changed and not saved yet),false
if not.
-
isDirty
boolean isDirty()Checks if there is a dirty state tracked by this handler.- Returns:
true
if there is a dirty state (data has changed and not saved yet),false
if not.- Since:
- 2.4
-