Spring Data Neo4j

org.springframework.data.neo4j.support.typerepresentation
Class IndexingRelationshipTypeRepresentationStrategy

java.lang.Object
  extended by org.springframework.data.neo4j.support.typerepresentation.IndexingRelationshipTypeRepresentationStrategy
All Implemented Interfaces:
RelationshipTypeRepresentationStrategy, TypeRepresentationStrategy<org.neo4j.graphdb.Relationship>

public class IndexingRelationshipTypeRepresentationStrategy
extends Object
implements RelationshipTypeRepresentationStrategy


Field Summary
static String INDEX_KEY
           
static String INDEX_NAME
           
static String TYPE_PROPERTY_NAME
           
 
Constructor Summary
IndexingRelationshipTypeRepresentationStrategy(GraphDatabase graphDb)
           
 
Method Summary
 long count(Class<?> entityClass)
           
<U> org.neo4j.helpers.collection.ClosableIterable<org.neo4j.graphdb.Relationship>
findAll(Class<U> clazz)
           
 Class<?> getJavaType(org.neo4j.graphdb.Relationship relationship)
           
 void postEntityCreation(org.neo4j.graphdb.Relationship state, Class<?> type)
          Callback for setting up and/or storing type information after creation.
 void preEntityRemoval(org.neo4j.graphdb.Relationship state)
          Callback for cleaning up type information before removal.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INDEX_NAME

public static final String INDEX_NAME
See Also:
Constant Field Values

TYPE_PROPERTY_NAME

public static final String TYPE_PROPERTY_NAME
See Also:
Constant Field Values

INDEX_KEY

public static final String INDEX_KEY
See Also:
Constant Field Values
Constructor Detail

IndexingRelationshipTypeRepresentationStrategy

public IndexingRelationshipTypeRepresentationStrategy(GraphDatabase graphDb)
Method Detail

postEntityCreation

public void postEntityCreation(org.neo4j.graphdb.Relationship state,
                               Class<?> type)
Description copied from interface: TypeRepresentationStrategy
Callback for setting up and/or storing type information after creation.

Specified by:
postEntityCreation in interface TypeRepresentationStrategy<org.neo4j.graphdb.Relationship>
Parameters:
state - Backing state of entity being created
type - Type of entity being created

findAll

public <U> org.neo4j.helpers.collection.ClosableIterable<org.neo4j.graphdb.Relationship> findAll(Class<U> clazz)
Specified by:
findAll in interface TypeRepresentationStrategy<org.neo4j.graphdb.Relationship>
Parameters:
clazz - Type whose instances should be iterated over
Returns:
lazy Iterable over all instances of the given type

count

public long count(Class<?> entityClass)
Specified by:
count in interface TypeRepresentationStrategy<org.neo4j.graphdb.Relationship>
Returns:
number of instances of this class contained in the graph

getJavaType

public Class<?> getJavaType(org.neo4j.graphdb.Relationship relationship)
Specified by:
getJavaType in interface TypeRepresentationStrategy<org.neo4j.graphdb.Relationship>
Returns:
java type that of the node entity of this node

preEntityRemoval

public void preEntityRemoval(org.neo4j.graphdb.Relationship state)
Description copied from interface: TypeRepresentationStrategy
Callback for cleaning up type information before removal. If state does not have any state associated, doesn't do anything.

Specified by:
preEntityRemoval in interface TypeRepresentationStrategy<org.neo4j.graphdb.Relationship>
Parameters:
state - Backing state of entity being removed

Spring Data Neo4j

Copyright © 2011 SpringSource. All Rights Reserved.