Package io.jmix.ui.data
Interface DataProvider
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
ContainerDataProvider
,ListDataProvider
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addChangeListener
(DataChangeListener listener) Adds listener to the data provider events.void
Adds an item to the data provider.default void
addItems
(Collection<? extends DataItem> items) Adds a collection of data items to the data provider.default DataItem
getItems()
void
Removes all items from the data provider.void
removeChangeListener
(DataChangeListener listener) Removes listener to data provider eventsvoid
removeItem
(DataItem item) Removes an item from the data provider.void
updateItem
(DataItem item) Update an item in the data provider if it is already there.
-
Method Details
-
getItems
- Returns:
- list of all items.
-
getItem
- Parameters:
id
- id of data item- Returns:
- data item by id
-
addItem
Adds an item to the data provider.- Parameters:
item
- an item to be added
-
addItems
Adds a collection of data items to the data provider.- Parameters:
items
- a collection of data items to be added
-
updateItem
Update an item in the data provider if it is already there.- Parameters:
item
- an item to be updated
-
removeItem
Removes an item from the data provider.- Parameters:
item
- an item to be removed
-
removeAll
void removeAll()Removes all items from the data provider. -
addChangeListener
Adds listener to the data provider events.- Parameters:
listener
- listener to be added
-
removeChangeListener
Removes listener to data provider events- Parameters:
listener
- listener to be removed
-