Class BulkAddResult<T>

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

public class BulkAddResult<T> extends Object
Represents the results from an 'addAll' operation.
  • Method Details

    • 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)