com.atlassian.crowd.manager.directory
Class BulkAddResult<T>

java.lang.Object
  extended by com.atlassian.crowd.manager.directory.BulkAddResult<T>

public class BulkAddResult<T>
extends Object

Represents the results from an 'addAll' operation.


Nested Class Summary
static class BulkAddResult.Builder<T>
           
 
Method Summary
static
<T> BulkAddResult.Builder<T>
builder(long attemptingToAdd)
           
 long getAddedSuccessfully()
          Calculates the number of entities which were successfully added, which is calculated as the number of entities which were attempted to be added minus both the failed entities (which couldn't be added) and the existing entities (which already existed and hence couldn't be added).
 long getAttemptedToAdd()
           
 Collection<T> getExistingEntities()
          Returns the entities which did not get overwritten during the bulk add process.
 Collection<T> getFailedEntities()
          Returns the entities which did failed to be added during the bulk add process.
 boolean isOverwriteUsed()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getFailedEntities

public Collection<T> getFailedEntities()
Returns the entities which did failed to be added during the bulk add process.

Returns:
failed entities.

getExistingEntities

public Collection<T> getExistingEntities()
Returns the entities which did not get overwritten during the bulk add process. This collection will be empty if overwrite is true.

Returns:
existing entities.

isOverwriteUsed

public boolean isOverwriteUsed()
Returns:
true iff the overwriting was requested during the bulk add process.

getAttemptedToAdd

public long getAttemptedToAdd()
Returns:
the number of entities that was asked to be bulk added.

getAddedSuccessfully

public long getAddedSuccessfully()
Calculates the number of entities which were successfully added, which is calculated as the number of entities which were attempted to be added minus both the failed entities (which couldn't be added) and the existing entities (which already existed and hence couldn't be added).

Returns:
attemptedToAdd - failedEntities - existingEntities

builder

public static <T> BulkAddResult.Builder<T> builder(long attemptingToAdd)


Copyright © 2014 Atlassian. All Rights Reserved.