|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface BatchableEntityProvider<T>
An extended version of MutableEntityProvider that can execute several
update operations (that is, adding new entities, and updating and removing
existing entities) inside a single transaction. This feature is used by
JPAContainer when write-through/auto-commit is turned off.
If the entites handled by this provider contain complex associations, special care should be taken to enforce data integrity. The following example scenarios might give unexpected results if not dealt with properly:
Example 1
Example 2
JPAContainer.setWriteThrough(boolean),
JPAContainer.isWriteThrough()| Nested Class Summary | |
|---|---|
static interface |
BatchableEntityProvider.BatchUpdateCallback<T>
Callback interface used by the batchUpdate(com.vaadin.addon.jpacontainer.BatchableEntityProvider.BatchUpdateCallback)
method. |
| Method Summary | |
|---|---|
void |
batchUpdate(BatchableEntityProvider.BatchUpdateCallback<T> callback)
Executes a batch update using the specified callback parameter. |
| Methods inherited from interface com.vaadin.addon.jpacontainer.MutableEntityProvider |
|---|
addEntity, removeEntity, updateEntity, updateEntityProperty |
| Method Detail |
|---|
void batchUpdate(BatchableEntityProvider.BatchUpdateCallback<T> callback)
throws UnsupportedOperationException
Clients should instantiate BatchableEntityProvider.BatchUpdateCallback, implement the
BatchableEntityProvider.BatchUpdateCallback.batchUpdate(MutableEntityProvider) method and
execute the updates as if they were using an ordinary
MutableEntityProvider. The following example saves a list of
transient entities:
provider.batchUpdate(new BatchUpdateCallback
callback - the callback that will be used to run the batch update.
UnsupportedOperationException - if this entity provider does not support batch updates.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||