Spring Data Neo4j

org.springframework.data.neo4j.fieldaccess
Class PropertyFieldAccessorFactory.PropertyFieldAccessor

java.lang.Object
  extended by org.springframework.data.neo4j.fieldaccess.PropertyFieldAccessorFactory.PropertyFieldAccessor
All Implemented Interfaces:
FieldAccessor
Direct Known Subclasses:
ConvertingNodePropertyFieldAccessorFactory.ConvertingNodePropertyFieldAccessor
Enclosing class:
PropertyFieldAccessorFactory

public static class PropertyFieldAccessorFactory.PropertyFieldAccessor
extends Object
implements FieldAccessor


Field Summary
protected  Class<?> fieldType
           
protected  Neo4jPersistentProperty property
           
protected  String propertyName
           
protected  Neo4jTemplate template
           
 
Constructor Summary
PropertyFieldAccessorFactory.PropertyFieldAccessor(Neo4jTemplate template, Neo4jPersistentProperty property)
           
 
Method Summary
protected  Object convertSimplePropertyValue(Object value)
           
protected  Object doGetValue(Object entity)
           
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

template

protected final Neo4jTemplate template

property

protected final Neo4jPersistentProperty property

propertyName

protected final String propertyName

fieldType

protected final Class<?> fieldType
Constructor Detail

PropertyFieldAccessorFactory.PropertyFieldAccessor

public PropertyFieldAccessorFactory.PropertyFieldAccessor(Neo4jTemplate template,
                                                          Neo4jPersistentProperty property)
Method Detail

isWriteable

public boolean isWriteable(Object entity)
Specified by:
isWriteable in interface FieldAccessor
Returns:
false for read only or computed fields, true otherwise

setValue

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

Specified by:
setValue in interface FieldAccessor
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

public final Object getValue(Object entity,
                             MappingPolicy mappingPolicy)
Specified by:
getValue in interface FieldAccessor
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.

doGetValue

protected Object doGetValue(Object entity)

convertSimplePropertyValue

protected Object convertSimplePropertyValue(Object value)

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.

Spring Data Neo4j

Copyright © 2011 SpringSource. All Rights Reserved.