org.springframework.data.neo4j.fieldaccess
Class RelatedToFieldAccessor
java.lang.Object
org.springframework.data.neo4j.fieldaccess.RelatedToFieldAccessor
- All Implemented Interfaces:
- FieldAccessor
- Direct Known Subclasses:
- RelatedToCollectionFieldAccessorFactory.RelatedToCollectionFieldAccessor, RelatedToSingleFieldAccessorFactory.RelatedToSingleFieldAccessor
public abstract class RelatedToFieldAccessor
- extends Object
- implements FieldAccessor
- 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
property
protected final Neo4jPersistentProperty property
direction
protected final org.neo4j.graphdb.Direction direction
relatedType
protected final Class<?> relatedType
template
protected final Neo4jTemplate template
relationshipHelper
protected RelationshipHelper relationshipHelper
RelatedToFieldAccessor
public RelatedToFieldAccessor(Class<?> relatedType,
Neo4jTemplate template,
org.neo4j.graphdb.Direction direction,
org.neo4j.graphdb.RelationshipType type,
Neo4jPersistentProperty property)
isWriteable
public boolean isWriteable(Object entity)
- Specified by:
isWriteable
in interface FieldAccessor
- Returns:
- false for read only or computed fields, true otherwise
createManagedSet
protected <T> ManagedFieldAccessorSet<T> createManagedSet(Object entity,
Set<T> result,
MappingPolicy mappingPolicy)
getDefaultValue
public Object getDefaultValue()
- Description copied from interface:
FieldAccessor
- Returns a default implementation for a field or
null
if none is provided.
This default implementation is returned in detached mode by the DetachedEntityState
when the value of the field is get.
- Specified by:
getDefaultValue
in interface FieldAccessor
- Returns:
- a default implementation for a field or
null
if none is provided.
checkAndGetNode
protected org.neo4j.graphdb.Node checkAndGetNode(Object entity)
removeMissingRelationships
protected void removeMissingRelationships(org.neo4j.graphdb.Node node,
Set<org.neo4j.graphdb.Node> targetNodes)
createAddedRelationships
protected void createAddedRelationships(org.neo4j.graphdb.Node node,
Set<org.neo4j.graphdb.Node> targetNodes)
createSetOfTargetNodes
protected Set<org.neo4j.graphdb.Node> createSetOfTargetNodes(Object newVal)
createEntitySetFromRelationshipEndNodes
protected Set<Object> createEntitySetFromRelationshipEndNodes(Object entity,
MappingPolicy mappingPolicy)
Copyright © 2012 SpringSource. All Rights Reserved.