Module is.codion.framework.model
Package is.codion.framework.model
Interface EntityEditModel.UpdateEntities
- Enclosing interface:
EntityEditModel
public static interface EntityEditModel.UpdateEntities
Represents a task for updating entities, split up for use with a background thread.
UpdateEntities update = editModel.createUpdate();
UpdateEntities.Task task = update.prepare();
// Can safely be called in a background thread
UpdateEntities.Result result = task.perform();
Collection<Entity> updatedEntities = result.handle();
EntityEditModel.UpdateEntities.Task.perform()
may be called on a background thread while prepare()
and EntityEditModel.UpdateEntities.Result.handle()
must be called on the UI thread.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
The update task resultstatic interface
The task performing the update operation -
Method Summary
Modifier and TypeMethodDescriptionprepare()
Notifies listeners that an update is about to be performed.
-
Method Details
-
prepare
EntityEditModel.UpdateEntities.Task prepare()Notifies listeners that an update is about to be performed. Must be called on the UI thread if this model has a panel based on it.- Returns:
- the update task
-