Spring Data Neo4j

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

java.lang.Object
  extended by org.springframework.data.neo4j.support.typerepresentation.TypeRepresentationStrategies
All Implemented Interfaces:
TypeRepresentationStrategy<org.neo4j.graphdb.PropertyContainer>

public class TypeRepresentationStrategies
extends Object
implements TypeRepresentationStrategy<org.neo4j.graphdb.PropertyContainer>

Since:
12.10.11
Author:
mh

Constructor Summary
TypeRepresentationStrategies(Neo4jMappingContext mappingContext, TypeRepresentationStrategy<org.neo4j.graphdb.Node> nodeTypeRepresentationStrategy, TypeRepresentationStrategy<org.neo4j.graphdb.Relationship> relationshipTypeRepresentationStrategy)
           
 
Method Summary
 long count(StoredEntityType type)
           
<U> org.neo4j.helpers.collection.ClosableIterable<org.neo4j.graphdb.PropertyContainer>
findAll(StoredEntityType type)
           
 TypeRepresentationStrategy<org.neo4j.graphdb.Node> getNodeTypeRepresentationStrategy()
           
 TypeRepresentationStrategy<org.neo4j.graphdb.Relationship> getRelationshipTypeRepresentationStrategy()
           
 void preEntityRemoval(org.neo4j.graphdb.PropertyContainer state)
          Callback for cleaning up type information before removal.
 Object readAliasFrom(org.neo4j.graphdb.PropertyContainer state)
           
 void writeTypeTo(org.neo4j.graphdb.PropertyContainer state, StoredEntityType type)
          Callback for setting up and/or storing type information after creation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeRepresentationStrategies

public TypeRepresentationStrategies(Neo4jMappingContext mappingContext,
                                    TypeRepresentationStrategy<org.neo4j.graphdb.Node> nodeTypeRepresentationStrategy,
                                    TypeRepresentationStrategy<org.neo4j.graphdb.Relationship> relationshipTypeRepresentationStrategy)
Method Detail

writeTypeTo

public void writeTypeTo(org.neo4j.graphdb.PropertyContainer state,
                        StoredEntityType type)
Description copied from interface: TypeRepresentationStrategy
Callback for setting up and/or storing type information after creation.

Specified by:
writeTypeTo in interface TypeRepresentationStrategy<org.neo4j.graphdb.PropertyContainer>
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.PropertyContainer> findAll(StoredEntityType type)
Specified by:
findAll in interface TypeRepresentationStrategy<org.neo4j.graphdb.PropertyContainer>

count

public long count(StoredEntityType type)
Specified by:
count in interface TypeRepresentationStrategy<org.neo4j.graphdb.PropertyContainer>

readAliasFrom

public Object readAliasFrom(org.neo4j.graphdb.PropertyContainer state)
Specified by:
readAliasFrom in interface TypeRepresentationStrategy<org.neo4j.graphdb.PropertyContainer>
Returns:
java type that of the node entity of this node

preEntityRemoval

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

getNodeTypeRepresentationStrategy

public TypeRepresentationStrategy<org.neo4j.graphdb.Node> getNodeTypeRepresentationStrategy()

getRelationshipTypeRepresentationStrategy

public TypeRepresentationStrategy<org.neo4j.graphdb.Relationship> getRelationshipTypeRepresentationStrategy()

Spring Data Neo4j

Copyright © 2012 SpringSource. All Rights Reserved.