org.modeshape.jcr.spi.index.provider

## Class IndexUsage

- java.lang.Object
- - org.modeshape.jcr.spi.index.provider.IndexUsage

-     public class IndexUsage
      extends Object

  A component that can determine if an index can be used to evaluate constraints. This is often used within an `IndexProvider` implementation during index planning. Specifically, see `IndexProvider.planUseOfIndex(QueryContext, IndexCostCalculator, String, ManagedIndex, IndexDefinition)`.
  See Also:
    `IndexProvider`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `IndexUsage(QueryContext context, IndexCostCalculator calculator, IndexDefinition defn)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected boolean` | `applies(ArithmeticOperand operand)`
    `protected boolean` | `applies(ChildCount operand)`
    `protected boolean` | `applies(DynamicOperand operand)`
    `protected boolean` | `applies(FullTextSearch operand)`
    `protected boolean` | `applies(Length operand)`
    `protected boolean` | `applies(LowerCase operand)`
    `protected boolean` | `applies(NodeDepth operand)`
    `protected boolean` | `applies(NodeId operand)`
    `protected boolean` | `applies(NodeLocalName operand)`
    `protected boolean` | `applies(NodeName operand)`
    `protected boolean` | `applies(NodePath operand)`
    `protected boolean` | `applies(Operator operator)`
    `protected boolean` | `applies(PropertyValue operand)`
    `protected boolean` | `applies(ReferenceValue operand)`
    `protected boolean` | `applies(UpperCase operand)`
    `protected boolean` | `indexAppliesTo(And and)`
    `protected boolean` | `indexAppliesTo(Between constraint)`
    `protected boolean` | `indexAppliesTo(ChildNodeJoinCondition condition)`
    `protected boolean` | `indexAppliesTo(Comparison constraint)`
    `boolean` | `indexAppliesTo(Constraint constraint)` Determine if this index can be used to evaluate the given constraint.
    `protected boolean` | `indexAppliesTo(DescendantNodeJoinCondition condition)`
    `protected boolean` | `indexAppliesTo(EquiJoinCondition condition)`
    `boolean` | `indexAppliesTo(JoinCondition condition)` Determine if this index can be used to evaluate the given join condition.
    `protected boolean` | `indexAppliesTo(Not not)`
    `protected boolean` | `indexAppliesTo(Or or)`
    `protected boolean` | `indexAppliesTo(PropertyExistence constraint)`
    `protected boolean` | `indexAppliesTo(Relike constraint)`
    `protected boolean` | `indexAppliesTo(SameNodeJoinCondition condition)`
    `protected boolean` | `indexAppliesTo(SetCriteria constraint)`
    `protected boolean` | `isReferenceIndex()`
    `protected boolean` | `isReferenceIndex(String refPropName)`
    `protected boolean` | `matchesSelectorName(String selectorName)`
    `protected Name` | `name(String name)`
    `protected NodeTypes` | `nodeTypes()`

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

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

- - ### Constructor Detail

    - #### IndexUsage

          public IndexUsage(QueryContext context,
                    IndexCostCalculator calculator,
                    IndexDefinition defn)

  - ### Method Detail

    - #### indexAppliesTo

          public boolean indexAppliesTo(JoinCondition condition)

      Determine if this index can be used to evaluate the given join condition.
      Parameters:
        `condition` - the condition; may not be null
      Returns:
        true if it can be used to evaluate the join condition, or false otherwise

    - #### indexAppliesTo

          protected boolean indexAppliesTo(ChildNodeJoinCondition condition)

    - #### indexAppliesTo

          protected boolean indexAppliesTo(DescendantNodeJoinCondition condition)

    - #### indexAppliesTo

          protected boolean indexAppliesTo(EquiJoinCondition condition)

    - #### indexAppliesTo

          protected boolean indexAppliesTo(SameNodeJoinCondition condition)

    - #### indexAppliesTo

          public boolean indexAppliesTo(Constraint constraint)

      Determine if this index can be used to evaluate the given constraint.
      Parameters:
        `constraint` - the constraint; may not be null
      Returns:
        true if it can be used to evaluate the constraint, or false otherwise

    - #### indexAppliesTo

          protected boolean indexAppliesTo(Comparison constraint)

    - #### indexAppliesTo

          protected boolean indexAppliesTo(And and)

    - #### indexAppliesTo

          protected boolean indexAppliesTo(Or or)

    - #### indexAppliesTo

          protected boolean indexAppliesTo(Not not)

    - #### indexAppliesTo

          protected boolean indexAppliesTo(Between constraint)

    - #### indexAppliesTo

          protected boolean indexAppliesTo(SetCriteria constraint)

    - #### indexAppliesTo

          protected boolean indexAppliesTo(Relike constraint)

    - #### indexAppliesTo

          protected boolean indexAppliesTo(PropertyExistence constraint)

    - #### applies

          protected boolean applies(Operator operator)

    - #### applies

          protected boolean applies(DynamicOperand operand)

    - #### applies

          protected boolean applies(PropertyValue operand)

    - #### applies

          protected boolean applies(UpperCase operand)

    - #### applies

          protected boolean applies(LowerCase operand)

    - #### applies

          protected boolean applies(Length operand)

    - #### applies

          protected boolean applies(ArithmeticOperand operand)

    - #### applies

          protected boolean applies(NodeName operand)

    - #### applies

          protected boolean applies(NodeLocalName operand)

    - #### applies

          protected boolean applies(NodePath operand)

    - #### applies

          protected boolean applies(NodeId operand)

    - #### applies

          protected boolean applies(NodeDepth operand)

    - #### applies

          protected boolean applies(ChildCount operand)

    - #### applies

          protected boolean applies(ReferenceValue operand)

    - #### applies

          protected boolean applies(FullTextSearch operand)

    - #### matchesSelectorName

          protected final boolean matchesSelectorName(String selectorName)

    - #### nodeTypes

          protected final NodeTypes nodeTypes()

    - #### name

          protected final Name name(String name)

    - #### isReferenceIndex

          protected final boolean isReferenceIndex(String refPropName)

    - #### isReferenceIndex

          protected final boolean isReferenceIndex()

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