mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

dugan
30.31.2008 abd513b18b6271c54c01c42d44453f9c5f241599
opendj-sdk/opends/src/server/org/opends/server/backends/jeb/importLDIF/IntegerImportIDSet.java
@@ -74,6 +74,26 @@
    count=1;
  }
  /**
   * {@inheritDoc}
   */
  public void setEntryID(EntryID id) {
    if(array == null) {
      this.array = new int[1];
    }
    reset();
    this.array[0] = (int) id.longValue();
    count=1;
  }
  /**
   * {@inheritDoc}
   */
  public void reset() {
    count = 0;
    isDefined = true;
    undefinedSize = 0;
  }
  /**
   * {@inheritDoc}
@@ -109,6 +129,35 @@
    }
  }
  /**
   * {@inheritDoc}
   */
  public void
  merge(ImportIDSet importIDSet, int limit, boolean maintainCount) {
    if(!isDefined()) {
      if(maintainCount)  {
        if(importIDSet.isDefined()) {
          undefinedSize += importIDSet.size();
        } else {
          undefinedSize += importIDSet.getUndefinedSize();
        }
      }
      return;
    }
    if(isDefined() && ((count + importIDSet.size()) > limit)) {
      isDefined = false;
      if(maintainCount)  {
        undefinedSize = size() + importIDSet.size();
      } else {
        undefinedSize = Long.MAX_VALUE;
      }
      array = null;
      count = 0;
    } else {
      addAll((IntegerImportIDSet) importIDSet);
    }
  }
  /**
   * {@inheritDoc}