org.kie.internal.utils

## Interface VariableIndexer<V>

- Type Parameters:
    `V` - type of the object that will represent indexed variable
  All Known Subinterfaces:
    ProcessVariableIndexer, TaskVariableIndexer

      public interface VariableIndexer<V>

  Variable indexer that allows to transform variable instance into other representation (usually string) to be able to use it for queries.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `accept(Object variable)` Tests if given variable shall be indexed by this indexer NOTE: only one indexer can be used for given variable
    `List<V>` | `index(String name, Object variable)` Performs index/transform operation of the variable.

- - ### Method Detail

    - #### accept

          boolean accept(Object variable)

      Tests if given variable shall be indexed by this indexer NOTE: only one indexer can be used for given variable
      Parameters:
        `variable` - variable to be indexed
      Returns:
        true if variable should be indexed with this indexer

    - #### index

          List<V> index(String name,
                        Object variable)

      Performs index/transform operation of the variable. Result of this operation can be either single value or list of values to support complex type separation. For example when variable is of type Person that has name, address phone indexer could build three entries out of it to represent individual fields: person = person.name address = person.address.street phone = person.phone that will allow more advanced queries to be used to find relevant entries.
      Parameters:
        `name` - name of the variable
        `variable` - actual variable value
      Returns:

Copyright © 2001–2017 JBoss by Red Hat. All rights reserved.