org.modeshape.jcr.api.index

## Interface IndexDefinitionTemplate

- All Superinterfaces:
    IndexDefinition, Iterable<IndexColumnDefinition>

      public interface IndexDefinitionTemplate
      extends IndexDefinition

  A mutable form of the `IndexDefinition`.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.modeshape.jcr.api.index.IndexDefinition

      `IndexDefinition.IndexKind, IndexDefinition.WorkspaceMatchRule`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getName()` Get the name of this index.
    `String` | `getProviderName()` Get the name of the provider that owns this index.
    `IndexDefinitionTemplate` | `setAllWorkspaces()` Set this index definition to apply to all workspaces.
    `IndexDefinitionTemplate` | `setColumnDefinitions(IndexColumnDefinition columnDefinition)` Set a single definitions for this index's columns
    `IndexDefinitionTemplate` | `setColumnDefinitions(IndexColumnDefinition firstColumnDefinition, IndexColumnDefinition... additionalColumnDefinitions)` Set a single definitions for this index's columns
    `IndexDefinitionTemplate` | `setColumnDefinitions(Iterable<? extends IndexColumnDefinition> columnDefinitions)` Set the definitions for this index's columns
    `IndexDefinitionTemplate` | `setDescription(String description)` Set the description for this index.
    `IndexDefinitionTemplate` | `setKind(IndexDefinition.IndexKind kind)` Set the kind of this index.
    `IndexDefinitionTemplate` | `setName(String name)` Set the name of the index.
    `IndexDefinitionTemplate` | `setNodeTypeName(String name)` Set the name of the node type for which this index applies.
    `IndexDefinitionTemplate` | `setProviderName(String providerName)` Set the name of the index provider implementation that owns this index.
    `IndexDefinitionTemplate` | `setSynchronous(boolean synchronous)` Set the whether this index should be updated synchronously within save calls.
    `IndexDefinitionTemplate` | `setWorkspace(String workspaceName)` Set the name of the workspace to which this definition applies.
    `IndexDefinitionTemplate` | `setWorkspaceNamePattern(String regex)` Set the names of the workspaces to which this definition applies using a regular expression pattern.
    `IndexDefinitionTemplate` | `setWorkspaces(String... workspaceNames)` Set the names of the workspaces to which this definition applies.

    - ### Methods inherited from interface org.modeshape.jcr.api.index.IndexDefinition

      `appliesToProperty, getColumnDefinition, getDescription, getIndexProperties, getIndexProperty, getKind, getNodeTypeName, getWorkspaceMatchRule, hasSingleColumn, isEnabled, isSynchronous, size`

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

      `iterator`

- - ### Method Detail

    - #### getName

          String getName()

      Get the name of this index.
      Specified by:
        `getName` in interface `IndexDefinition`
      Returns:
        the name of this index; null if the value has not yet been set on this template

    - #### getProviderName

          String getProviderName()

      Get the name of the provider that owns this index.
      Specified by:
        `getProviderName` in interface `IndexDefinition`
      Returns:
        the provider name; null if the value has not yet been set on this template

    - #### setName

          IndexDefinitionTemplate setName(String name)

      Set the name of the index.
      Parameters:
        `name` - the index name; may not be null
      Returns:
        this instance for method chaining; never null

    - #### setProviderName

          IndexDefinitionTemplate setProviderName(String providerName)

      Set the name of the index provider implementation that owns this index.
      Parameters:
        `providerName` - the provider's name; may not be null
      Returns:
        this instance for method chaining; never null

    - #### setKind

          IndexDefinitionTemplate setKind(IndexDefinition.IndexKind kind)

      Set the kind of this index.
      Parameters:
        `kind` - the kind; may not be null
      Returns:
        this instance for method chaining; never null

    - #### setNodeTypeName

          IndexDefinitionTemplate setNodeTypeName(String name)

      Set the name of the node type for which this index applies.
      Parameters:
        `name` - the name of the node type for which this index applies; may be null if the property applies to all node types (e.g., `nt:base`).
      Returns:
        this instance for method chaining; never null

    - #### setDescription

          IndexDefinitionTemplate setDescription(String description)

      Set the description for this index.
      Parameters:
        `description` - the description; may be null or empty
      Returns:
        this instance for method chaining; never null

    - #### setSynchronous

          IndexDefinitionTemplate setSynchronous(boolean synchronous)

      Set the whether this index should be updated synchronously within save calls.
      Parameters:
        `synchronous` - true if this index should be updated synchronously before the corresponding save call returns, or false if the index is to be updated asynchronously after the save call
      Returns:
        this instance for method chaining; never null

    - #### setColumnDefinitions

          IndexDefinitionTemplate setColumnDefinitions(Iterable<? extends IndexColumnDefinition> columnDefinitions)

      Set the definitions for this index's columns
      Parameters:
        `columnDefinitions` - the definitions for the columns; may not be null or empty
      Returns:
        this instance for method chaining; never null

    - #### setColumnDefinitions

          IndexDefinitionTemplate setColumnDefinitions(IndexColumnDefinition columnDefinition)

      Set a single definitions for this index's columns
      Parameters:
        `columnDefinition` - the definitions for the column; may not be null
      Returns:
        this instance for method chaining; never null

    - #### setColumnDefinitions

          IndexDefinitionTemplate setColumnDefinitions(IndexColumnDefinition firstColumnDefinition,
                                                     IndexColumnDefinition... additionalColumnDefinitions)

      Set a single definitions for this index's columns
      Parameters:
        `firstColumnDefinition` - the definition for the first column; may not be null
        `additionalColumnDefinitions` - the definitions for additional columns; may not be null
      Returns:
        this instance for method chaining; never null

    - #### setAllWorkspaces

          IndexDefinitionTemplate setAllWorkspaces()

      Set this index definition to apply to all workspaces.
      Returns:
        this instance for method chaining; never null

    - #### setWorkspace

          IndexDefinitionTemplate setWorkspace(String workspaceName)

      Set the name of the workspace to which this definition applies.
      Parameters:
        `workspaceName` - the workspace name; may not be null
      Returns:
        this instance for method chaining; never null

    - #### setWorkspaces

          IndexDefinitionTemplate setWorkspaces(String... workspaceNames)

      Set the names of the workspaces to which this definition applies.
      Parameters:
        `workspaceNames` - the workspace names; may not be null
      Returns:
        this instance for method chaining; never null

    - #### setWorkspaceNamePattern

          IndexDefinitionTemplate setWorkspaceNamePattern(String regex)

      Set the names of the workspaces to which this definition applies using a regular expression pattern.
      Parameters:
        `regex` - the regular expression that matches the workspaces to which this index applies; may not be null
      Returns:
        this instance for method chaining; never null

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