org.modeshape.jcr.api.index

## Interface IndexDefinition

- All Superinterfaces:
    Iterable<IndexColumnDefinition>
  All Known Subinterfaces:
    IndexDefinitionTemplate

      public interface IndexDefinition
      extends Iterable<IndexColumnDefinition>

  An immutable description of an index definition.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static class` | `IndexDefinition.IndexKind` The kind of indexes.
    `static interface` | `IndexDefinition.WorkspaceMatchRule`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `IndexColumnDefinition` | `getColumnDefinition(int position)` Get the definition for the index column at the given 0-based position.
    `String` | `getDescription()` Get the description of this index.
    `Map<String,Object>` | `getIndexProperties()` Get the index property values keyed by their name.
    `Object` | `getIndexProperty(String propertyName)` Get the index property with the given name.
    `IndexDefinition.IndexKind` | `getKind()` Get the kind of index.
    `String` | `getName()` Get the name of this index.
    `String` | `getNodeTypeName()` Get the name of the node type for which this index applies.
    `String` | `getProviderName()` Get the name of the provider that owns this index.
    `IndexDefinition.WorkspaceMatchRule` | `getWorkspaceMatchRule()` Get the rule that defines the workspaces to which this index definition applies.
    `boolean` | `hasSingleColumn()` Determine whether this index has a single column.
    `boolean` | `isEnabled()` Determine whether this index is currently enabled.
    `int` | `size()` Get the number of columns in this index.

    - ### Methods inherited from interface java.lang.Iterable

      `iterator`

- - ### Method Detail

    - #### getName

          String getName()

      Get the name of this index.
      Returns:
        the name of this index; never null

    - #### getProviderName

          String getProviderName()

      Get the name of the provider that owns this index.
      Returns:
        the provider name; never null

    - #### getKind

          IndexDefinition.IndexKind getKind()

      Get the kind of index.
      Returns:
        the index kind; never null

    - #### getNodeTypeName

          String getNodeTypeName()

      Get the name of the node type for which this index applies.
      Returns:
        the node type name; never null

    - #### getDescription

          String getDescription()

      Get the description of this index.
      Returns:
        the description; never null

    - #### isEnabled

          boolean isEnabled()

      Determine whether this index is currently enabled.
      Returns:
        true if this index is enabled and active, or false if it is not currently being used

    - #### hasSingleColumn

          boolean hasSingleColumn()

      Determine whether this index has a single column.
      Returns:
        true if this index has a single column, or false if it has more

    - #### size

          int size()

      Get the number of columns in this index.
      Returns:
        the number of columns; always positive

    - #### getColumnDefinition

          IndexColumnDefinition getColumnDefinition(int position)
                                                    throws NoSuchElementException

      Get the definition for the index column at the given 0-based position.
      Parameters:
        `position` - the 0-based position; must be less than `size()`
      Returns:
        the index definition
      Throws:
        `NoSuchElementException` - if the position is negative or greater than or equal to `size()`.

    - #### getIndexProperty

          Object getIndexProperty(String propertyName)

      Get the index property with the given name. These properties are usually non-standard.
      Parameters:
        `propertyName` - the property name; may not be null
      Returns:
        the value or values of the property, or null if there is no property with that name

    - #### getIndexProperties

          Map<String,Object> getIndexProperties()

      Get the index property values keyed by their name. These properties are usually non-standard.
      Returns:
        the properties; never null but possibly empty

    - #### getWorkspaceMatchRule

          IndexDefinition.WorkspaceMatchRule getWorkspaceMatchRule()

      Get the rule that defines the workspaces to which this index definition applies.
      Returns:
        the matching rule for the workspace names; never null

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