ReadableIndex (Neo4j Community 2.1.0-M01 API)
Date: 2014-02-20

org.neo4j.graphdb.index

## Interface ReadableIndex<T extends PropertyContainer>

- Type Parameters:
    `T` - The Primitive this Index holds
  All Known Subinterfaces:
    Index<T>, ReadableRelationshipIndex, RelationshipIndex

      public interface ReadableIndex<T extends PropertyContainer>

  An index that allows for read only operations. Can also be seen as a chopped down version of `Index` that disallows mutating operations.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `IndexHits<T>` | `get(String key, Object value)` Returns exact matches from this index, given the key/value pair.
    `Class<T>` | `getEntityType()`
    `GraphDatabaseService` | `getGraphDatabase()` Get the `graph database` that owns this index.
    `String` | `getName()`
    `boolean` | `isWriteable()` A ReadableIndex is possible to support mutating operations as well.
    `IndexHits<T>` | `query(Object queryOrQueryObject)` Returns matches from this index based on the supplied query object, which can be a query string or an implementation-specific query object.
    `IndexHits<T>` | `query(String key, Object queryOrQueryObject)` Returns matches from this index based on the supplied `key` and query object, which can be a query string or an implementation-specific query object.

- - ### Method Detail

    - #### getName

          String getName()

      Returns:
        the name of the index, i.e. the name this index was created with.

    - #### getEntityType

          Class<T> getEntityType()

      Returns:
        the type of entities are managed by this index.

    - #### get

          IndexHits<T> get(String key,
                         Object value)

      Returns exact matches from this index, given the key/value pair. Matches will be for key/value pairs just as they were added by the `Index.add(PropertyContainer, String, Object)` method.
      Parameters:
        `key` - the key in the key/value pair to match.
        `value` - the value in the key/value pair to match.
      Returns:
        the result wrapped in an `IndexHits` object. If the entire result set isn't looped through, `IndexHits.close()` must be called before disposing of the result.

    - #### query

          IndexHits<T> query(String key,
                           Object queryOrQueryObject)

      Returns matches from this index based on the supplied `key` and query object, which can be a query string or an implementation-specific query object.
      Parameters:
        `key` - the key in this query.
        `queryOrQueryObject` - the query for the `key` to match.
      Returns:
        the result wrapped in an `IndexHits` object. If the entire result set isn't looped through, `IndexHits.close()` must be called before disposing of the result.

    - #### query

          IndexHits<T> query(Object queryOrQueryObject)

      Returns matches from this index based on the supplied query object, which can be a query string or an implementation-specific query object.
      Parameters:
        `queryOrQueryObject` - the query to match.
      Returns:
        the result wrapped in an `IndexHits` object. If the entire result set isn't looped through, `IndexHits.close()` must be called before disposing of the result.

    - #### isWriteable

          boolean isWriteable()

      A ReadableIndex is possible to support mutating operations as well. This method returns true iff such operations are supported by the implementation.
      Returns:
        true iff mutating operations are supported.

    - #### getGraphDatabase

          GraphDatabaseService getGraphDatabase()

      Get the `graph database` that owns this index.
      Returns:
        the `graph database` that owns this index.

Copyright © 2002–2014 The Neo4j Graph Database Project. All rights reserved.