com.tinkerpop.blueprints.impls.neo4j
Class Neo4jIndex<T extends com.tinkerpop.blueprints.impls.neo4j.Neo4jElement,S extends org.neo4j.graphdb.PropertyContainer>

java.lang.Object
  extended by com.tinkerpop.blueprints.impls.neo4j.Neo4jIndex<T,S>
All Implemented Interfaces:
Index<T>

public class Neo4jIndex<T extends com.tinkerpop.blueprints.impls.neo4j.Neo4jElement,S extends org.neo4j.graphdb.PropertyContainer>
extends Object
implements Index<T>

Author:
Marko A. Rodriguez (http://markorodriguez.com)

Field Summary
protected  Neo4jGraph graph
           
protected  org.neo4j.graphdb.index.Index<S> rawIndex
           
 
Constructor Summary
protected Neo4jIndex(String indexName, Class<T> indexClass, Neo4jGraph graph, Parameter... indexParameters)
           
 
Method Summary
 long count(String key, Object value)
          

The underlying Neo4j graph does not natively support this method within a transaction.

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

The underlying Neo4j graph does not natively support this method within a transaction.

 Class<T> getIndexClass()
           
 String getIndexName()
           
 org.neo4j.graphdb.index.Index<S> getRawIndex()
           
 void put(String key, Object value, T element)
           
 CloseableIterable<T> query(String key, Object query)
          

The underlying Neo4j graph does not natively support this method within a transaction.

 void remove(String key, Object value, T element)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

graph

protected final Neo4jGraph graph

rawIndex

protected org.neo4j.graphdb.index.Index<S extends org.neo4j.graphdb.PropertyContainer> rawIndex
Constructor Detail

Neo4jIndex

protected Neo4jIndex(String indexName,
                     Class<T> indexClass,
                     Neo4jGraph graph,
                     Parameter... indexParameters)
Method Detail

getIndexClass

public Class<T> getIndexClass()
Specified by:
getIndexClass in interface Index<T extends com.tinkerpop.blueprints.impls.neo4j.Neo4jElement>

getIndexName

public String getIndexName()
Specified by:
getIndexName in interface Index<T extends com.tinkerpop.blueprints.impls.neo4j.Neo4jElement>

put

public void put(String key,
                Object value,
                T element)
Specified by:
put in interface Index<T extends com.tinkerpop.blueprints.impls.neo4j.Neo4jElement>

get

public CloseableIterable<T> get(String key,
                                Object value)

The underlying Neo4j graph does not natively support this method within a transaction. If the graph is not currently in a transaction, then the operation runs efficiently. If the graph is in a transaction, then, for every element, a try/catch is used to determine if its in the current transaction.

Specified by:
get in interface Index<T extends com.tinkerpop.blueprints.impls.neo4j.Neo4jElement>

query

public CloseableIterable<T> query(String key,
                                  Object query)

The underlying Neo4j graph does not natively support this method within a transaction. If the graph is not currently in a transaction, then the operation runs efficiently. If the graph is in a transaction, then, for every element, a try/catch is used to determine if its in the current transaction.

Specified by:
query in interface Index<T extends com.tinkerpop.blueprints.impls.neo4j.Neo4jElement>

count

public long count(String key,
                  Object value)

The underlying Neo4j graph does not natively support this method within a transaction. If the graph is not currently in a transaction, then the operation runs efficiently. If the graph is in a transaction, then, for every element, a try/catch is used to determine if its in the current transaction.

Specified by:
count in interface Index<T extends com.tinkerpop.blueprints.impls.neo4j.Neo4jElement>

remove

public void remove(String key,
                   Object value,
                   T element)
Specified by:
remove in interface Index<T extends com.tinkerpop.blueprints.impls.neo4j.Neo4jElement>

toString

public String toString()
Overrides:
toString in class Object

getRawIndex

public org.neo4j.graphdb.index.Index<S> getRawIndex()


Copyright © 2010-2012. All Rights Reserved.