org.springframework.data.graph.neo4j.fieldaccess
Class AbstractNodeRelationshipFieldAccessor<ENTITY extends GraphBacked,STATE extends org.neo4j.graphdb.PropertyContainer,TARGET extends GraphBacked,TSTATE extends org.neo4j.graphdb.PropertyContainer>
java.lang.Object
org.springframework.data.graph.neo4j.fieldaccess.AbstractNodeRelationshipFieldAccessor<ENTITY,STATE,TARGET,TSTATE>
- All Implemented Interfaces:
- FieldAccessor<ENTITY>
- Direct Known Subclasses:
- NodeToNodesRelationshipFieldAccessor, OneToNRelationshipEntityFieldAccessorFactory.OneToNRelationshipEntityFieldAccessor
public abstract class AbstractNodeRelationshipFieldAccessor<ENTITY extends GraphBacked,STATE extends org.neo4j.graphdb.PropertyContainer,TARGET extends GraphBacked,TSTATE extends org.neo4j.graphdb.PropertyContainer>
- extends Object
- implements FieldAccessor<ENTITY>
- Since:
- 11.09.2010
- Author:
- Michael Hunger
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
type
protected final org.neo4j.graphdb.RelationshipType type
field
protected final Field field
direction
protected final org.neo4j.graphdb.Direction direction
relatedType
protected final Class<? extends TARGET extends GraphBacked> relatedType
graphDatabaseContext
protected final GraphDatabaseContext graphDatabaseContext
AbstractNodeRelationshipFieldAccessor
public AbstractNodeRelationshipFieldAccessor(Class<? extends TARGET> clazz,
GraphDatabaseContext graphDatabaseContext,
org.neo4j.graphdb.Direction direction,
org.neo4j.graphdb.RelationshipType type,
Field field)
isWriteable
public boolean isWriteable(ENTITY entity)
- Specified by:
isWriteable
in interface FieldAccessor<ENTITY extends GraphBacked>
- Returns:
- false for read only or computed fields, true otherwise
checkUnderlyingNode
protected STATE checkUnderlyingNode(ENTITY entity)
removeMissingRelationships
protected void removeMissingRelationships(org.neo4j.graphdb.Node node,
Set<org.neo4j.graphdb.Node> targetNodes)
createAddedRelationships
protected void createAddedRelationships(STATE node,
Set<TSTATE> targetNodes)
checkNoCircularReference
protected void checkNoCircularReference(org.neo4j.graphdb.Node node,
Set<STATE> targetNodes)
checkTargetIsSetOfNodebacked
protected Set<STATE> checkTargetIsSetOfNodebacked(Object newVal)
createManagedSet
protected ManagedFieldAccessorSet<ENTITY,TARGET> createManagedSet(ENTITY entity,
Set<TARGET> result)
createEntitySetFromRelationshipEndNodes
protected Set<TARGET> createEntitySetFromRelationshipEndNodes(ENTITY entity)
createSingleRelationship
protected void createSingleRelationship(STATE start,
TSTATE end)
obtainSingleRelationship
protected abstract org.neo4j.graphdb.Relationship obtainSingleRelationship(STATE start,
TSTATE end)
getStatesFromEntity
protected abstract Iterable<TSTATE> getStatesFromEntity(ENTITY entity)
getState
protected abstract STATE getState(ENTITY entity)
Copyright © 2011. All Rights Reserved.