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

Matthew Swift
24.07.2015 748a3df9bb3ea38a49cd4c0fe498496e0da85cb8
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/VLVIndex.java
@@ -452,7 +452,7 @@
   * JE database.
   * @throws DirectoryException If a Directory Server error occurs.
   */
  boolean containsValues(ReadableStorage txn, long entryID, ByteString[] values, AttributeType[] types)
  private boolean containsValues(ReadableStorage txn, long entryID, ByteString[] values, AttributeType[] types)
      throws StorageRuntimeException, DirectoryException
  {
    SortValuesSet valuesSet = getSortValuesSet(txn, entryID, values, types);
@@ -465,7 +465,7 @@
   *
   * @return The types of the attribute values to sort on.
   */
  AttributeType[] getSortTypes()
  private AttributeType[] getSortTypes()
  {
    SortKey[] sortKeys = sortOrder.getSortKeys();
    AttributeType[] types = new AttributeType[sortKeys.length];
@@ -962,7 +962,7 @@
   * @param entry The entry to get the values from.
   * @return The attribute values to sort on.
   */
  ByteString[] getSortValues(Entry entry)
  private ByteString[] getSortValues(Entry entry)
  {
    SortKey[] sortKeys = sortOrder.getSortKeys();
    ByteString[] values = new ByteString[sortKeys.length];
@@ -1106,7 +1106,7 @@
   *         otherwise.
   * @throws DirectoryException If a Directory Server error occurs.
   */
  boolean shouldInclude(Entry entry) throws DirectoryException
  private boolean shouldInclude(Entry entry) throws DirectoryException
  {
    DN entryDN = entry.getName();
    return entryDN.matchesBaseAndScope(baseDN, scope)
@@ -1372,4 +1372,9 @@
  {
    return sortOrder;
  }
  boolean verifyEntry(ReadableStorage txn, EntryID entryID, Entry entry) throws DirectoryException
  {
    return shouldInclude(entry) && !containsValues(txn, entryID.longValue(), getSortValues(entry), getSortTypes());
  }
}