Spring Data Graph

org.springframework.data.graph.neo4j.fieldaccess
Class OneToNRelationshipFieldAccessorFactory

java.lang.Object
  extended by org.springframework.data.graph.neo4j.fieldaccess.OneToNRelationshipFieldAccessorFactory
All Implemented Interfaces:
FieldAccessorFactory<NodeBacked>

public class OneToNRelationshipFieldAccessorFactory
extends Object


Nested Class Summary
static class OneToNRelationshipFieldAccessorFactory.OneToNRelationshipFieldAccessor
           
 
Field Summary
protected  GraphDatabaseContext graphDatabaseContext
           
 
Constructor Summary
OneToNRelationshipFieldAccessorFactory(GraphDatabaseContext graphDatabaseContext)
           
 
Method Summary
 boolean accept(Field f)
           
protected  org.neo4j.graphdb.Direction dirFrom(RelatedTo relAnnotation)
           
 FieldAccessor<NodeBacked> forField(Field field)
           
protected  RelatedTo getRelationshipAnnotation(Field field)
           
protected  boolean hasValidRelationshipAnnotation(Field field)
           
protected  Class<? extends NodeBacked> targetFrom(Field field)
           
protected  Class<? extends NodeBacked> targetFrom(RelatedTo relAnnotation)
           
protected  org.neo4j.graphdb.DynamicRelationshipType typeFrom(Field field)
           
protected  org.neo4j.graphdb.DynamicRelationshipType typeFrom(RelatedTo relAnnotation)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

graphDatabaseContext

protected GraphDatabaseContext graphDatabaseContext
Constructor Detail

OneToNRelationshipFieldAccessorFactory

public OneToNRelationshipFieldAccessorFactory(GraphDatabaseContext graphDatabaseContext)
Method Detail

accept

public boolean accept(Field f)
Parameters:
f - field to check
Returns:
true if this factory is responsible for creating a accessor for this field

forField

public FieldAccessor<NodeBacked> forField(Field field)
Parameters:
field - the field to create an accessor for
Returns:
a field accessor for the field or null if none can be created

targetFrom

protected Class<? extends NodeBacked> targetFrom(Field field)

targetFrom

protected Class<? extends NodeBacked> targetFrom(RelatedTo relAnnotation)

dirFrom

protected org.neo4j.graphdb.Direction dirFrom(RelatedTo relAnnotation)

typeFrom

protected org.neo4j.graphdb.DynamicRelationshipType typeFrom(Field field)

typeFrom

protected org.neo4j.graphdb.DynamicRelationshipType typeFrom(RelatedTo relAnnotation)

getRelationshipAnnotation

protected RelatedTo getRelationshipAnnotation(Field field)

hasValidRelationshipAnnotation

protected boolean hasValidRelationshipAnnotation(Field field)

Spring Data Graph

Copyright © 2011. All Rights Reserved.