Class BulkResult

java.lang.Object
org.apache.juneau.console.views.BulkResult

@BeanType(properties="contractVersion,succeeded,notFound,failed") public final class BulkResult extends Object
The response shape of an aggregate-mode bulk action (RowAction.BulkMode.AGGREGATE) — one outcome per id submitted in the matching BulkRequest.
Own, independently-versioned contract

CONTRACT_VERSION is this type's own wire contract, never aliased to VIEW, ACTION_RESULT, or BulkMutateDef.CONTRACT_VERSION — each of those versions what it defines (a view's shape, a single-row action's outcome, a bulk-mutate action list) and this one versions only this response shape.

Example:

@RestPost(path="/changes/abort") public BulkResult abortChanges(@Content BulkRequest request) { BulkResult.Builder result = BulkResult.create(); for (String id : request.ids) { Change change = changeStore.find(id); if (change == null) { result.notFound(id); } else if (!"PENDING".equals(change.state)) { result.failed(new BulkResult.Failure(id, "Change is already merged.")); } else { changeStore.abort(id); result.succeeded(id); } } return result.build(); }

Since:
10.0.0