Class OIndexMultiValues

java.lang.Object
com.orientechnologies.orient.core.index.OIndexAbstract
com.orientechnologies.orient.core.index.OIndexMultiValues
All Implemented Interfaces:
OIndex, OIndexInternal, Comparable<OIndex>
Direct Known Subclasses:
OIndexFullText, OIndexNotUnique

public abstract class OIndexMultiValues extends OIndexAbstract
Abstract index implementation that supports multi-values for the same key.
Author:
Luca Garulli (l.garulli--(at)--orientdb.com)
  • Method Details

    • get

      @Deprecated public Collection<ORID> get(Object key)
      Deprecated.
      Description copied from interface: OIndex
      Gets the set of records associated with the passed key.
      Parameters:
      key - The key to search
      Returns:
      The Record set if found, otherwise an empty Set
    • getRidsIgnoreTx

      public Stream<ORID> getRidsIgnoreTx(Object key)
    • getRids

      public Stream<ORID> getRids(Object key)
    • put

      public OIndexMultiValues put(Object key, OIdentifiable singleValue)
      Description copied from interface: OIndex
      Inserts a new entry in the index. The behaviour depends by the index implementation.
      Parameters:
      key - Entry's key
      singleValue - Entry's value as OIdentifiable instance
      Returns:
      The index instance itself to allow in chain calls
    • isNativeTxSupported

      public boolean isNativeTxSupported()
    • remove

      public boolean remove(Object key, OIdentifiable value)
      Description copied from interface: OIndex
      Removes an entry by its key and value.
      Specified by:
      remove in interface OIndex
      Overrides:
      remove in class OIndexAbstract
      Parameters:
      key - The entry's key to remove
      Returns:
      True if the entry has been found and removed, otherwise false
    • streamEntriesBetween

      public Stream<ORawPair<Object,ORID>> streamEntriesBetween(Object fromKey, boolean fromInclusive, Object toKey, boolean toInclusive, boolean ascOrder)
      Description copied from interface: OIndexInternal
      Returns stream which presents subset of index data between passed in keys.
      Parameters:
      fromKey - Lower border of index data.
      fromInclusive - Indicates whether lower border should be inclusive or exclusive.
      toKey - Upper border of index data.
      toInclusive - Indicates whether upper border should be inclusive or exclusive.
      ascOrder - Flag which determines whether data iterated by stream should be in ascending or descending order.
      Returns:
      Cursor which presents subset of index data between passed in keys.
    • streamEntriesMajor

      public Stream<ORawPair<Object,ORID>> streamEntriesMajor(Object fromKey, boolean fromInclusive, boolean ascOrder)
      Description copied from interface: OIndexInternal
      Returns stream which presents subset of data which associated with key which is greater than passed in key.
      Parameters:
      fromKey - Lower border of index data.
      fromInclusive - Indicates whether lower border should be inclusive or exclusive.
      ascOrder - Flag which determines whether data iterated by stream should be in ascending or descending order.
      Returns:
      stream which presents subset of data which associated with key which is greater than passed in key.
    • streamEntriesMinor

      public Stream<ORawPair<Object,ORID>> streamEntriesMinor(Object toKey, boolean toInclusive, boolean ascOrder)
      Description copied from interface: OIndexInternal
      Returns stream which presents subset of data which associated with key which is less than passed in key.
      Parameters:
      toKey - Upper border of index data.
      toInclusive - Indicates Indicates whether upper border should be inclusive or exclusive.
      ascOrder - Flag which determines whether data iterated by stream should be in ascending or descending order.
      Returns:
      stream which presents subset of data which associated with key which is less than passed in key.
    • streamEntries

      public Stream<ORawPair<Object,ORID>> streamEntries(Collection<?> keys, boolean ascSortOrder)
      Description copied from interface: OIndexInternal
      Returns stream which presents data associated with passed in keys.
      Parameters:
      keys - Keys data of which should be returned.
      ascSortOrder - Flag which determines whether data iterated by stream should be in ascending or descending order.
      Returns:
      stream which presents data associated with passed in keys.
    • calculateTxValue

      public static Set<OIdentifiable> calculateTxValue(Object key, OTransactionIndexChanges indexChanges)
    • size

      public long size()
      Returns:
      number of entries in the index.
    • stream

      public Stream<ORawPair<Object,ORID>> stream()
    • descStream

      public Stream<ORawPair<Object,ORID>> descStream()