Spring Data Graph

org.springframework.data.neo4j.fieldaccess
Class OneToNRelationshipEntityFieldAccessorFactory.OneToNRelationshipEntityFieldAccessor

java.lang.Object
  extended by org.springframework.data.neo4j.fieldaccess.AbstractNodeRelationshipFieldAccessor<NodeBacked,org.neo4j.graphdb.Node,RelationshipBacked,org.neo4j.graphdb.Relationship>
      extended by org.springframework.data.neo4j.fieldaccess.OneToNRelationshipEntityFieldAccessorFactory.OneToNRelationshipEntityFieldAccessor
All Implemented Interfaces:
FieldAccessor<NodeBacked>
Enclosing class:
OneToNRelationshipEntityFieldAccessorFactory

public static class OneToNRelationshipEntityFieldAccessorFactory.OneToNRelationshipEntityFieldAccessor
extends AbstractNodeRelationshipFieldAccessor<NodeBacked,org.neo4j.graphdb.Node,RelationshipBacked,org.neo4j.graphdb.Relationship>


Field Summary
 
Fields inherited from class org.springframework.data.neo4j.fieldaccess.AbstractNodeRelationshipFieldAccessor
direction, field, graphDatabaseContext, relatedType, type
 
Constructor Summary
OneToNRelationshipEntityFieldAccessorFactory.OneToNRelationshipEntityFieldAccessor(org.neo4j.graphdb.RelationshipType type, org.neo4j.graphdb.Direction direction, Class<? extends RelationshipBacked> elementClass, GraphDatabaseContext graphDatabaseContext, Field field)
           
 
Method Summary
protected  org.neo4j.graphdb.Node getState(NodeBacked nodeBacked)
           
protected  Iterable<org.neo4j.graphdb.Relationship> getStatesFromEntity(NodeBacked entity)
           
 Object getValue(NodeBacked entity)
           
 boolean isWriteable(NodeBacked nodeBacked)
           
protected  org.neo4j.graphdb.Relationship obtainSingleRelationship(org.neo4j.graphdb.Node start, org.neo4j.graphdb.Relationship end)
           
 Object setValue(NodeBacked entity, Object newVal)
          handles field write modification.
 
Methods inherited from class org.springframework.data.neo4j.fieldaccess.AbstractNodeRelationshipFieldAccessor
checkTargetIsSetOfNodebacked, checkUnderlyingNode, createAddedRelationships, createEntitySetFromRelationshipEndNodes, createManagedSet, createSingleRelationship, removeMissingRelationships
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OneToNRelationshipEntityFieldAccessorFactory.OneToNRelationshipEntityFieldAccessor

public OneToNRelationshipEntityFieldAccessorFactory.OneToNRelationshipEntityFieldAccessor(org.neo4j.graphdb.RelationshipType type,
                                                                                          org.neo4j.graphdb.Direction direction,
                                                                                          Class<? extends RelationshipBacked> elementClass,
                                                                                          GraphDatabaseContext graphDatabaseContext,
                                                                                          Field field)
Method Detail

setValue

public Object setValue(NodeBacked entity,
                       Object newVal)
Description copied from interface: FieldAccessor
handles field write modification.

Returns:
the written value or a DoReturn wrapper with the written value or null. DoReturn indicates that the aspect should not proceed to the original field access but instead return immediately.

isWriteable

public boolean isWriteable(NodeBacked nodeBacked)
Specified by:
isWriteable in interface FieldAccessor<NodeBacked>
Overrides:
isWriteable in class AbstractNodeRelationshipFieldAccessor<NodeBacked,org.neo4j.graphdb.Node,RelationshipBacked,org.neo4j.graphdb.Relationship>
Returns:
false for read only or computed fields, true otherwise

getValue

public Object getValue(NodeBacked entity)
Returns:
the value or a DoReturn wrapper with the value for the field. DoReturn indicates that the aspect should not proceed to the original field access but instead return immediately.

getStatesFromEntity

protected Iterable<org.neo4j.graphdb.Relationship> getStatesFromEntity(NodeBacked entity)
Specified by:
getStatesFromEntity in class AbstractNodeRelationshipFieldAccessor<NodeBacked,org.neo4j.graphdb.Node,RelationshipBacked,org.neo4j.graphdb.Relationship>

obtainSingleRelationship

protected org.neo4j.graphdb.Relationship obtainSingleRelationship(org.neo4j.graphdb.Node start,
                                                                  org.neo4j.graphdb.Relationship end)
Specified by:
obtainSingleRelationship in class AbstractNodeRelationshipFieldAccessor<NodeBacked,org.neo4j.graphdb.Node,RelationshipBacked,org.neo4j.graphdb.Relationship>

getState

protected org.neo4j.graphdb.Node getState(NodeBacked nodeBacked)
Specified by:
getState in class AbstractNodeRelationshipFieldAccessor<NodeBacked,org.neo4j.graphdb.Node,RelationshipBacked,org.neo4j.graphdb.Relationship>

Spring Data Graph

Copyright © 2011 SpringSource. All Rights Reserved.