Class SimpleIndex<T>

Type Parameters:
T - field's value type
Direct Known Subclasses:
ComplexSubFieldIndex, SimpleFieldIndex

public abstract class SimpleIndex<T> extends Index
An index on a simple field, either a regular simple field or a sub-field of a complex field.
  • Method Details

    • getField

      public SimpleField<T> getField()
      Get the indexed field.
      Returns:
      the indexed field
    • getEncoding

      public Encoding<T> getEncoding()
      Get the indexed field's encoding.
      Returns:
      the indexed field's encoding
    • getIndex

      public abstract CoreIndex1<T,ObjId> getIndex(Transaction tx)
      Description copied from class: Index
      Get this index's view of the given transaction.
      Specified by:
      getIndex in class Index
      Parameters:
      tx - transaction
      Returns:
      view of this index in tx
    • getKey

      public byte[] getKey(T value)
      Get the byte[] key in the underlying key/value store corresponding to the given value in this index.

      The returned key will be the prefix of all index entries with the given value over all objects.

      Parameters:
      value - indexed value
      Returns:
      the corresponding KVDatabase key
      See Also:
    • getKey

      public byte[] getKey(ObjId id, T value)
      Get the byte[] key in the underlying key/value store corresponding to the given value and target object in this index.
      Parameters:
      id - target object ID
      value - indexed value
      Returns:
      the corresponding KVDatabase key
      See Also: