org.modeshape.jcr.index.local

## Interface IndexValues.Converter<T>

- Type Parameters:
    `T` - the index's key type
  All Known Implementing Classes:
    IndexValues.StandardConverter
  Enclosing class:
    IndexValues

      public static interface IndexValues.Converter<T>

  Converts between `StaticOperand` and an index's key type.

  Note that `IndexDefinition.IndexKind.DUPLICATES` indexes may have multiple node keys for a given value, which means that any given value might have a range of keys. Some MapDB-based indexes store such entries using an index key that consists of the actual property value plus a counter. In this way, there are multiple index keys for a given `StaticOperand`, and the `toLowerValue(StaticOperand)` will return the lowest-possible index key given the `StaticOperand`, while the `toUpperValue(StaticOperand)` will return the highest-possible index key for the given `StaticOperand`

  `IndexDefinition.IndexKind.UNIQUE` indexes will use the actual property value as the index key, and thus the `toLowerValue(StaticOperand)` and `toUpperValue(StaticOperand)` methods will both return the same index key for the same `StaticOperand`.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `T` | `toLowerValue(StaticOperand operand)` Create the lowest possible index key for the supplied `StaticOperand`.
    `T` | `toUpperValue(StaticOperand operand)` Create the highest possible index key for the supplied `StaticOperand`.

- - ### Method Detail

    - #### toLowerValue

          T toLowerValue(StaticOperand operand)

      Create the lowest possible index key for the supplied `StaticOperand`.
      Parameters:
        `operand` - the static operand; may be null
      Returns:
        the lowest/smallest possible index key; or null if the operand is null

    - #### toUpperValue

          T toUpperValue(StaticOperand operand)

      Create the highest possible index key for the supplied `StaticOperand`.
      Parameters:
        `operand` - the static operand; may be null
      Returns:
        the highest/largest possible index key; or null if the operand is null

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.