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.


Constructor Summary
BulkAddResult(long attemptingToAdd, boolean overwrite)
           
 
Method Summary
 void addExistingEntity(T entity)
           
 void addFailedEntities(Collection<T> entities)
           
 void addFailedEntity(T entity)
           
 long getAddedSuccessfully()
           
 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
 

Constructor Detail

BulkAddResult

public BulkAddResult(long attemptingToAdd,
                     boolean overwrite)
Method Detail

addFailedEntities

public void addFailedEntities(Collection<T> entities)

addFailedEntity

public void addFailedEntity(T entity)

addExistingEntity

public void addExistingEntity(T entity)

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()
Returns:
attemptedToAdd - failedEntities - existingEntities


Copyright © 2012 Atlassian. All Rights Reserved.