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

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

public final class BulkItem<T>
extends Object
implements Serializable

This class represents an individual data piece in the context of a bulk operation

See Also:
Serialized Form

Nested Class Summary
static class BulkItem.BulkItemBuilder<T>
           
 
Method Summary
static
<T> BulkItem.BulkItemBuilder<T>
builder()
           
 Serializable getCustomProperty(String key)
          A custom property stored under the given key
 Exception getException()
          An exception if the item was failed
 Serializable getId()
          The item id
 String getMessage()
          Message to add context on this item.
 T getPayload()
          The actual data this entity represents
 String getStatusCode()
          An optional status code
 boolean isSuccessful()
          Wether or not it 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 item id


isSuccessful

public boolean isSuccessful()
Wether or not it was successful. Notice that this should be false if exception is not null, however there might not be an exception but the item could still not be successful for other reasons.


getMessage

public String getMessage()
Message to add context on this item. Could be an error description, a warning or simply some info related to the operation


getStatusCode

public String getStatusCode()
An optional status code


getException

public Exception getException()
An exception if the item was failed


getPayload

public T getPayload()
The actual data this entity represents


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> BulkItem.BulkItemBuilder<T> builder()


Copyright © 2015 MuleSoft, Inc.. All rights reserved.