org.modeshape.jcr.query.engine

## Class IndexPlanners

- java.lang.Object
- - org.modeshape.jcr.query.engine.IndexPlanners

-     public abstract class IndexPlanners
      extends Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static String` | `CHILDREN_BY_PATH_INDEX_NAME`
    `protected static String` | `DESCENDANTS_BY_PATH_INDEX_NAME`
    `protected static String` | `NODE_BY_PATH_INDEX_NAME`
    `protected static String` | `PATH_PARAMETER`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IndexPlanners()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract void` | `applyIndexes(QueryContext context, SelectorName selector, List<Constraint> andedConstraints, RepositoryIndexes indexDefinitions, IndexCollector indexes)` Examine the supplied constraints applied to the given selector in a query, and record in the supplied `IndexCollector` any and all indexes in this provider that can be used in this query.
    `static IndexPlanners` | `implicit()` Get the IndexPlanners instance that looks only for the implicit (built-in) indexes.
    `static IndexPlanners` | `withProviders(Map<String,IndexPlanner> plannersByProviderName)` Get an IndexPlanners instance that looks for the implicit (built-in) indexes and that calls the appropriate `IndexPlanner` instances given the available indexes for this selector.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### NODE_BY_PATH_INDEX_NAME

          protected static final String NODE_BY_PATH_INDEX_NAME

      See Also:
        Constant Field Values

    - #### CHILDREN_BY_PATH_INDEX_NAME

          protected static final String CHILDREN_BY_PATH_INDEX_NAME

      See Also:
        Constant Field Values

    - #### DESCENDANTS_BY_PATH_INDEX_NAME

          protected static final String DESCENDANTS_BY_PATH_INDEX_NAME

      See Also:
        Constant Field Values

    - #### PATH_PARAMETER

          protected static final String PATH_PARAMETER

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### IndexPlanners

          public IndexPlanners()

  - ### Method Detail

    - #### applyIndexes

          public abstract void applyIndexes(QueryContext context,
                          SelectorName selector,
                          List<Constraint> andedConstraints,
                          RepositoryIndexes indexDefinitions,
                          IndexCollector indexes)

      Examine the supplied constraints applied to the given selector in a query, and record in the supplied `IndexCollector` any and all indexes in this provider that can be used in this query.
      Parameters:
        `context` - the context in which the query is being executed, provided by ModeShape; never null
        `selector` - the name of the selector against which all of the `andedConstraints` are to be applied; never null
        `andedConstraints` - the immutable list of `Constraint` instances that are all AND-ed and applied against the `selector`; never null but possibly empty
        `indexDefinitions` - the available index definitions that apply to the node type identified by the named selector; may be null if there are no indexes defined
        `indexes` - the list provided by the caller into which this method should add the index(es), if any, that the query engine might use to satisfy the relevant portion of the query; never null

    - #### implicit

          public static IndexPlanners implicit()

      Get the IndexPlanners instance that looks only for the implicit (built-in) indexes.
      Returns:
        the instance; never null

    - #### withProviders

          public static IndexPlanners withProviders(Map<String,IndexPlanner> plannersByProviderName)

      Get an IndexPlanners instance that looks for the implicit (built-in) indexes and that calls the appropriate `IndexPlanner` instances given the available indexes for this selector.
      Parameters:
        `plannersByProviderName` - the map of query index planners keyed by the provider's name
      Returns:
        the instance; never null

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