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