public interface EditableModel
Follows data model interface and adds method to deal with edit/add/modify.
Modifier and Type | Method and Description |
---|---|
void |
addTemplateValue() |
boolean |
addValue(Object value)
Adds new value at the end of the model.
|
ListDiff |
getListDiff()
Returns the list diff, ignoring all data that has not changed.
|
Object |
getOriginalData()
Returns original data used for data model creation.
|
int |
getRowCount() |
Object |
getRowData() |
int |
getRowIndex() |
Integer |
getRowKey()
Gets unique key identifier for this row.
|
Object |
getUnreferencedTemplate() |
Object |
getWrappedData()
Gets wrapped data.
|
void |
insertTemplateValue(int index) |
void |
insertValue(int index,
Object value)
Inserts value at given index on the model.
|
boolean |
isDirty()
Returns true if any changes occurred on the model.
|
boolean |
isRowAvailable() |
boolean |
isRowModified()
Returns true if row data has changed from its original value.
|
boolean |
isRowNew()
Returns true if row data is not in the original list.
|
Object |
moveValue(int fromIndex,
int toIndex)
Modifies value at given index on the model.
|
void |
recordValueModified(int index,
Object newValue)
Records a value has been modified at given index.
|
Object |
removeValue(int index)
Removes value at given index.
|
void |
setListDiff(ListDiff listDiff)
Sets list diff.
|
void |
setRowData(Object rowData)
Sets row data using given value.
|
void |
setRowIndex(int rowIndex) |
void |
setRowKey(Integer key)
Sets unique key identifier for this row.
|
void |
setWrappedData(Object data)
Sets wrapped data.
|
int |
size()
Returns the model size.
|
Object getOriginalData()
Object getWrappedData()
This data may be different from the original one if any changes occured on the model.
void setWrappedData(Object data)
Object getUnreferencedTemplate()
boolean isRowAvailable()
DataModel.isRowAvailable()
boolean isRowModified()
boolean isRowNew()
void recordValueModified(int index, Object newValue)
int getRowCount()
DataModel.getRowCount()
Object getRowData()
DataModel.getRowData()
void setRowData(Object rowData)
int getRowIndex()
DataModel.getRowIndex()
void setRowIndex(int rowIndex)
DataModel.setRowIndex(int)
ListDiff getListDiff()
The list diff tracks chronologically all changes that were made to the original (and changing) model.
void setListDiff(ListDiff listDiff)
boolean isDirty()
void addTemplateValue()
void insertValue(int index, Object value)
IllegalArgumentException
- if model does not handle this index.void insertTemplateValue(int index)
Object moveValue(int fromIndex, int toIndex)
IllegalArgumentException
- if model does not handle one of given indexes.Object removeValue(int index)
IllegalArgumentException
- if model does not handle this index.int size()
Copyright © 2018 Nuxeo. All rights reserved.