org.kuali.rice.kcb.quartz
Class ProcessingResult<T>

java.lang.Object
  extended by org.kuali.rice.kcb.quartz.ProcessingResult<T>

public class ProcessingResult<T>
extends Object

Encapsulates the number of successes and failures in a giving processing run

Author:
Kuali Rice Team (rice.collab@kuali.org)

Nested Class Summary
static class ProcessingResult.Failure<T>
          Represents a failure of a work item
 
Field Summary
private  List<ProcessingResult.Failure<T>> failures
          List of failures
private  List<T> successes
          List of successes
 
Constructor Summary
ProcessingResult()
           
 
Method Summary
 void add(ProcessingResult<T> result)
          Adds the contents of the specified ProcessingResult to this ProcessingResult
 void addAllFailures(Collection<ProcessingResult.Failure<T>> c)
          Adds a collection of failures
 void addAllSuccesses(Collection<T> c)
          Adds a collectin of successes
 void addFailure(ProcessingResult.Failure<T> o)
          Adds a failure
 void addSuccess(T o)
          Adds a success
 List<ProcessingResult.Failure<T>> getFailures()
          Returns the list of failures
 List<T> getSuccesses()
          Returns the list of successes
 String toString()
          Returns a string representation of this ProcessingResults object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

failures

private List<ProcessingResult.Failure<T>> failures
List of failures


successes

private List<T> successes
List of successes

Constructor Detail

ProcessingResult

public ProcessingResult()
Method Detail

getFailures

public List<ProcessingResult.Failure<T>> getFailures()
Returns the list of failures

Returns:
the list of failures

getSuccesses

public List<T> getSuccesses()
Returns the list of successes

Returns:
the list of successes

addFailure

public void addFailure(ProcessingResult.Failure<T> o)
Adds a failure

Parameters:
o - an object representing a failure

addAllFailures

public void addAllFailures(Collection<ProcessingResult.Failure<T>> c)
Adds a collection of failures

Parameters:
Collection - a collection of failures

addSuccess

public void addSuccess(T o)
Adds a success

Parameters:
o - an object representing a success

addAllSuccesses

public void addAllSuccesses(Collection<T> c)
Adds a collectin of successes

Parameters:
Collection - a collection of successes

add

public void add(ProcessingResult<T> result)
Adds the contents of the specified ProcessingResult to this ProcessingResult

Parameters:
result - the result to append to this result

toString

public String toString()
Returns a string representation of this ProcessingResults object

Overrides:
toString in class Object
See Also:
Object.toString()


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.