Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
* This class is used to provide item level information about a bulk operation. This
* master entity represents the bulk operation as a whole, while the detail entity
* {@link BulkItem} represents the operation status for each individual data piece.
* The {@link #items} list defines a contract in which the ordering of those items
* needs to match the ordering of the original objects. For example, if the bulk
* operation consisted of 10 person objects in which number X corresponded to the
* person 'John Doe', then the Xth item in the {@link #items} list must reference to
* the result of procesing the same 'John Doe'
public final class BulkOperationResult<T> implements Serializable
* The operation id
public Serializable getId();
* Whether or not the operation was successful. Should be <code>true</code> if
* and only if all the child {@link BulkItem} entities were also successful
public boolean isSuccessful();
* An ordered list of {@link BulkItem}, one per each item in the original
* operation, no matter if the record was successful or not
public List<BulkItem<T>> getItems();
* A custom property stored under the given key
* @param key the key of the custom property
* @return a {@link Serializable} value
public Serializable getCustomProperty(String key);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.