Spring Data Neo4j

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

java.lang.Object
  extended by org.springframework.data.neo4j.support.typerepresentation.NoopNodeTypeRepresentationStrategy
All Implemented Interfaces:
NodeTypeRepresentationStrategy, TypeRepresentationStrategy<org.neo4j.graphdb.Node>

public class NoopNodeTypeRepresentationStrategy
extends Object
implements NodeTypeRepresentationStrategy


Constructor Summary
NoopNodeTypeRepresentationStrategy()
           
 
Method Summary
 long count(Class<?> entityClass)
           
<U> org.neo4j.helpers.collection.ClosableIterable<org.neo4j.graphdb.Node>
findAll(Class<U> clazz)
           
 Class<?> getJavaType(org.neo4j.graphdb.Node state)
           
 void postEntityCreation(org.neo4j.graphdb.Node state, Class<?> type)
          Callback for setting up and/or storing type information after creation.
 void preEntityRemoval(org.neo4j.graphdb.Node 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
 

Constructor Detail

NoopNodeTypeRepresentationStrategy

public NoopNodeTypeRepresentationStrategy()
Method Detail

postEntityCreation

public void postEntityCreation(org.neo4j.graphdb.Node 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.Node>
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.Node> findAll(Class<U> clazz)
Specified by:
findAll in interface TypeRepresentationStrategy<org.neo4j.graphdb.Node>
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.Node>
Returns:
number of instances of this class contained in the graph

preEntityRemoval

public void preEntityRemoval(org.neo4j.graphdb.Node 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.Node>
Parameters:
state - Backing state of entity being removed

getJavaType

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

Spring Data Neo4j

Copyright © 2011 SpringSource. All Rights Reserved.