Spring Data Neo4j

org.springframework.data.neo4j.fieldaccess
Interface FieldAccessor

All Known Implementing Classes:
AbstractNodeRelationshipFieldAccessor, ConvertingNodePropertyFieldAccessorFactory.ConvertingNodePropertyFieldAccessor, DynamicPropertiesFieldAccessorFactory.DynamicPropertiesFieldAccessor, IdFieldAccessorFactory.IdFieldAccessor, NodeToNodesRelationshipFieldAccessor, OneToNRelationshipEntityFieldAccessorFactory.OneToNRelationshipEntityFieldAccessor, OneToNRelationshipFieldAccessorFactory.OneToNRelationshipFieldAccessor, PropertyFieldAccessorFactory.PropertyFieldAccessor, QueryFieldAccessorFactory.QueryFieldAccessor, ReadOnlyOneToNRelationshipFieldAccessorFactory.ReadOnlyOneToNRelationshipFieldAccessor, RelationshipNodeFieldAccessorFactory.RelationshipNodeFieldAccessor, SingleRelationshipFieldAccessorFactory.SingleRelationshipFieldAccessor, TransientFieldAccessorFactory.TransientFieldAccessor, TraversalFieldAccessorFactory.TraversalFieldAccessor

public interface FieldAccessor

interface for field accessors, encapsulates reading and writing from fields and write support information about the field. It is used by the EntityState.


Method Summary
 Object getDefaultValue()
          Returns a default implementation for a field or null if none is provided.
 Object getValue(Object entity, MappingPolicy mappingPolicy)
           
 boolean isWriteable(Object entity)
           
 Object setValue(Object entity, Object newVal, MappingPolicy mappingPolicy)
          handles field write modification.
 

Method Detail

getDefaultValue

Object getDefaultValue()
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.

Returns:
a default implementation for a field or null if none is provided.

setValue

Object setValue(Object entity,
                Object newVal,
                MappingPolicy mappingPolicy)
handles field write modification.

Parameters:
entity -
newVal -
mappingPolicy -
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.

getValue

Object getValue(Object entity,
                MappingPolicy mappingPolicy)
Parameters:
entity -
mappingPolicy -
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.

isWriteable

boolean isWriteable(Object entity)
Parameters:
entity -
Returns:
false for read only or computed fields, true otherwise

Spring Data Neo4j

Copyright © 2011 SpringSource. All Rights Reserved.