org.mule.common.bulk
Class BulkOperationResult<T>

java.lang.Object
  extended by org.mule.common.bulk.BulkOperationResult<T>
All Implemented Interfaces:
Serializable

public final class BulkOperationResult<T>
extends Object
implements Serializable

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 BulkItem represents the operation status for each individual data piece. The 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 items list must reference to the result of procesing the same 'John Doe'

See Also:
Serialized Form

Nested Class Summary
static class BulkOperationResult.BulkOperationResultBuilder<T>
           
 
Method Summary
static
<T> BulkOperationResult.BulkOperationResultBuilder<T>
builder()
           
 Serializable getCustomProperty(String key)
          A custom property stored under the given key
 Serializable getId()
          The operation id
 List<BulkItem<T>> getItems()
          An ordered list of BulkItem, one per each item in the original operation, no matter if the record was successful or not
 boolean isSuccessful()
          Whether or not the operation was successful.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getId

public Serializable getId()
The operation id


isSuccessful

public boolean isSuccessful()
Whether or not the operation was successful. Should be true if and only if all the child BulkItem entities were also successful


getItems

public List<BulkItem<T>> getItems()
An ordered list of BulkItem, one per each item in the original operation, no matter if the record was successful or not


getCustomProperty

public Serializable getCustomProperty(String key)
A custom property stored under the given key

Parameters:
key - the key of the custom property
Returns:
a Serializable value

builder

public static <T> BulkOperationResult.BulkOperationResultBuilder<T> builder()


Copyright © 2014. All rights reserved.